html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #eef0f2;
}

/* Site banner - High Court of Sindh theme */
.site-topbar {
  height: 6px;
  background-color: #071726;
}

.site-banner {
  background-color: #155a8a;
  border-bottom: 3px solid #7a1f1f;
  margin-bottom: 1.5rem;
}

.site-banner-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-logo {
  flex-shrink: 0;
  display: flex;
}

/* Sized to match the three-line title block beside it (court name + two gold lines). */
.site-logo img,
.site-logo svg {
  width: clamp(92px, 60px + 4.5vw, 128px);
  height: clamp(92px, 60px + 4.5vw, 128px);
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 0 3px #f4c542, 0 2px 8px rgba(0, 0, 0, 0.35);
  object-fit: contain;
}

.site-title {
  min-width: 0;
}

.site-title h1 {
  color: #fff;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.3px;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Same size and weight as the court name so the recruitment title is equally prominent. */
.site-title h2 {
  color: #f4c542;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.3px;
  margin: 0.35rem 0 0;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  text-wrap: balance;
}

/* Consecutive gold lines read as one title block. */
.site-title h2 + h2 {
  margin-top: 0.1rem;
}

/* Phones: keep the logo beside the title, both scaled down to fit one row. */
@media (max-width: 575.98px) {
  .site-banner-inner {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .site-logo img,
  .site-logo svg {
    width: 68px;
    height: 68px;
    box-shadow: 0 0 0 2px #f4c542, 0 2px 6px rgba(0, 0, 0, 0.35);
  }

  .site-title h1 {
    font-size: 1.15rem;
  }

  .site-title h2 {
    font-size: 1rem;
    margin-top: 0.2rem;
  }
}

/* Card heading on the CNIC entry page */
.card-title-lg {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  font-weight: 700;
  text-wrap: balance;
}

/* Card heading (post name + letter): bold, in the banner blue, so it stands out from the helper text */
.card-post-title {
  color: #155a8a;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

/* Primary buttons match the banner color */
.btn-primary {
  background-color: #155a8a;
  border-color: #155a8a;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #0f4266 !important;
  border-color: #0f4266 !important;
}

/* Bordered white cards, matching the reference panel style */
.card {
  border: 1px solid #d8dde3;
  border-radius: 0.5rem;
}

.card-accent-top {
  border-top: 3px solid #155a8a;
}

.cnic-icon {
  background-color: #f2f3f5;
  color: #155a8a;
}

/* Footer */
.site-footer {
  border-top: 1px solid #dee2e6;
  color: #6c757d;
  text-align: center;
  padding: 1rem 0;
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #eef0f2;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    margin-bottom: 0;
  }
}

/* Security code (CAPTCHA) on the CNIC entry page */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.captcha-image {
  width: 180px;
  max-width: calc(100% - 3.5rem);
  height: auto;
  aspect-ratio: 3 / 1;
  border: 1px solid #d8dde3;
  border-radius: 0.375rem;
  background-color: #f2f3f5;
  user-select: none;
}

#captcha:not(:placeholder-shown) {
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

/* Date of Birth as three dropdowns: DD / MON / YYYY */
.dob-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.4fr;
  gap: 0.5rem;
}

.dob-row .form-select {
  padding-left: 0.6rem;
  padding-right: 1.6rem;
  background-position: right 0.4rem center;
  min-width: 0;
}
