/* ─────────────────────────────────────────────────────────
   RSS Admission Form — Frontend Styles
   ───────────────────────────────────────────────────────── */

:root {
  --raf-primary:   #1a5276;
  --raf-primary-d: #154360;
  --raf-accent:    #2e86c1;
  --raf-success:   #1e8449;
  --raf-error:     #c0392b;
  --raf-border:    #d5d8dc;
  --raf-bg:        #f4f6f8;
  --raf-section:   #eaf0f6;
  --raf-radius:    8px;
  --raf-shadow:    0 2px 16px rgba(0,0,0,.09);
}

/* Container */
.raf-container {
  max-width: 860px;
  margin: 32px auto;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
}

/* ════════════════════════════════════════════════════════
   PROFESSIONAL HEADER
   ════════════════════════════════════════════════════════ */

.raf-form-header {
  border-radius: var(--raf-radius) var(--raf-radius) 0 0;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
}

/* ── Top ribbon ── */
.raf-top-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d2137;
  color: rgba(255,255,255,.75);
  font-size: 11px;
  padding: 6px 20px;
  letter-spacing: .03em;
}
.raf-top-ribbon strong { color: #f0c040; letter-spacing: .02em; }

/* ── Hero band ── */
.raf-hero-band {
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(135deg, #0d2d4e 0%, #1a5276 55%, #1f6fa6 100%);
  padding: 22px 24px 20px;
  position: relative;
  overflow: hidden;
}

/* Subtle watermark rings */
.raf-hero-band::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 40px solid rgba(255,255,255,.04);
  pointer-events: none;
}
.raf-hero-band::after {
  content: '';
  position: absolute;
  right: 40px; top: 10px;
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 28px solid rgba(255,255,255,.03);
  pointer-events: none;
}

/* ── Logo ── */
.raf-hero-logo {
  flex: 0 0 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}
.raf-logo-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  padding: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 4px 16px rgba(0,0,0,.3);
}
.raf-logo-svg {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.07);
  padding: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 4px 16px rgba(0,0,0,.3);
}

/* ── Center ── */
.raf-hero-center {
  flex: 1;
  text-align: center;
  color: #fff;
  padding: 0 12px;
}
.raf-hero-name-bn {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  letter-spacing: .01em;
}
.raf-hero-name-en {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 3px;
}
.raf-hero-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px auto;
  width: 80%;
}
.raf-hero-rule span:first-child,
.raf-hero-rule span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(240,192,64,.6), transparent);
  display: block;
}
.raf-hero-diamond {
  font-size: 10px;
  color: #f0c040;
  flex: 0;
}
.raf-hero-addr {
  font-size: 12.5px;
  color: rgba(255,255,255,.82);
  letter-spacing: .01em;
  margin-top: 2px;
}
.raf-hero-meta {
  margin-top: 7px;
  font-size: 11.5px;
  color: rgba(255,255,255,.6);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.raf-meta-sep { opacity: .4; }

/* ── Right badge ── */
.raf-hero-badge {
  flex: 0 0 110px;
  text-align: center;
  margin-left: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 12px 10px;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}
.raf-badge-icon {
  font-size: 22px;
  margin-bottom: 6px;
  line-height: 1;
}
.raf-badge-title-bn {
  font-size: 14px;
  font-weight: 800;
  color: #f0c040;
  line-height: 1.2;
  letter-spacing: .01em;
}
.raf-badge-title-en {
  font-size: 8.5px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 3px;
}
.raf-badge-year {
  margin-top: 8px;
  background: #f0c040;
  color: #0d2137;
  font-size: 12px;
  font-weight: 800;
  border-radius: 20px;
  padding: 2px 10px;
  display: inline-block;
  letter-spacing: .05em;
}

/* ── Colour bar ── */
.raf-colour-bar {
  display: flex;
  height: 5px;
}
.raf-cb-1 { flex: 1; background: #e74c3c; }
.raf-cb-2 { flex: 1; background: #f0c040; }
.raf-cb-3 { flex: 1; background: #27ae60; }
.raf-cb-4 { flex: 1; background: #2e86c1; }

/* ── Responsive header ── */
@media (max-width: 600px) {
  .raf-hero-band { flex-wrap: wrap; justify-content: center; padding: 18px 16px 16px; }
  .raf-hero-logo { margin-right: 0; margin-bottom: 12px; flex: 0 0 100%; justify-content: center; }
  .raf-hero-center { flex: 0 0 100%; padding: 0; }
  .raf-hero-badge { flex: 0 0 auto; margin: 14px auto 0; }
  .raf-hero-name-bn { font-size: 20px; }
  .raf-top-ribbon { flex-direction: column; gap: 3px; text-align: center; }
}

/* Form body */
#raf-admission-form {
  background: #fff;
  border: 1px solid var(--raf-border);
  border-top: none;
  padding: 0 0 28px;
  border-radius: 0 0 var(--raf-radius) var(--raf-radius);
  box-shadow: var(--raf-shadow);
}

/* Section */
.raf-section {
  padding: 24px 32px 8px;
  border-bottom: 1px solid #eaecee;
}
.raf-section:last-of-type { border-bottom: none; }

.raf-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--raf-primary);
  margin-bottom: 18px;
}
.raf-section-num {
  background: var(--raf-primary);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* Grid */
.raf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.raf-col-full { grid-column: 1 / -1; }
.raf-col-half { grid-column: span 1; }

/* Fields */
.raf-field { display: flex; flex-direction: column; gap: 5px; }
.raf-field label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
.raf-req { color: var(--raf-error); margin-left: 2px; }
.raf-hint { font-weight: 400; color: #888; font-size: 11px; }

.raf-field input[type="text"],
.raf-field input[type="email"],
.raf-field input[type="tel"],
.raf-field input[type="date"],
.raf-field select,
.raf-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--raf-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.raf-field input:focus,
.raf-field select:focus,
.raf-field textarea:focus {
  outline: none;
  border-color: var(--raf-accent);
  box-shadow: 0 0 0 3px rgba(46,134,193,.15);
}
.raf-field input.raf-invalid,
.raf-field select.raf-invalid,
.raf-field textarea.raf-invalid {
  border-color: var(--raf-error);
  box-shadow: 0 0 0 2px rgba(192,57,43,.12);
}
.raf-field textarea { resize: vertical; min-height: 80px; }
.raf-error { font-size: 12px; color: var(--raf-error); min-height: 16px; }

/* Photo upload */
.raf-photo-drop {
  position: relative;
  border: 2px dashed var(--raf-border);
  border-radius: 6px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s;
  overflow: hidden;
}
.raf-photo-drop:hover { border-color: var(--raf-accent); }
.raf-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #999;
  font-size: 13px;
  padding: 16px;
  text-align: center;
}
.raf-photo-placeholder svg { color: #bbb; }
.raf-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
#raf-photo-preview {
  max-width: 100px;
  max-height: 110px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Declaration */
.raf-declaration { padding: 16px 32px; }
.raf-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  cursor: pointer;
}
.raf-checkbox-label input { margin-top: 3px; flex-shrink: 0; }

/* Submit row */
.raf-submit-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 32px 0;
  flex-wrap: wrap;
}

.raf-btn-submit {
  background: var(--raf-primary);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.raf-btn-submit:hover { background: var(--raf-primary-d); }
.raf-btn-submit:active { transform: scale(.98); }
.raf-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.raf-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: raf-spin .7s linear infinite;
}
@keyframes raf-spin { to { transform: rotate(360deg); } }

.raf-btn-reset {
  background: transparent;
  color: #777;
  border: 1px solid #ccc;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.raf-btn-reset:hover { background: #f4f4f4; }

/* Messages */
#raf-form-messages {
  padding: 0 32px;
  margin-top: 14px;
}
.raf-alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 10px;
}
.raf-alert-error { background: #fdecea; color: var(--raf-error); border-left: 4px solid var(--raf-error); }
.raf-alert-success { background: #eafaf1; color: #1e5631; border-left: 4px solid var(--raf-success); }

/* ── Success Panel ───────────────────────────── */
#raf-success-panel {
  background: #fff;
  border: 1px solid var(--raf-border);
  border-radius: var(--raf-radius);
  box-shadow: var(--raf-shadow);
  padding: 48px 32px 40px;
  text-align: center;
}
.raf-success-icon {
  width: 64px;
  height: 64px;
  background: var(--raf-success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 18px;
}
.raf-success-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin: 0 0 10px; }
.raf-success-body  { color: #555; font-size: 15px; margin: 0 0 8px; }
.raf-success-id    { color: #888; font-size: 14px; margin: 0 0 24px; }
.raf-success-id strong { color: var(--raf-primary); font-size: 16px; }

.raf-success-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.raf-btn-pdf {
  background: var(--raf-success);
  color: #fff;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .15s;
}
.raf-btn-pdf:hover { opacity: .9; color: #fff; }
.raf-btn-new {
  background: transparent;
  border: 1px solid var(--raf-border);
  color: #555;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.raf-btn-new:hover { background: #f4f4f4; }
.raf-email-note { font-size: 12px; color: #999; margin: 0; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 620px) {
  .raf-section,
  .raf-declaration,
  .raf-submit-row,
  #raf-form-messages { padding-left: 18px; padding-right: 18px; }
  .raf-grid { grid-template-columns: 1fr; }
  .raf-col-half { grid-column: 1 / -1; }
  .raf-office-row { flex-wrap: wrap; }
}

/* ─── Bangla Form Specific Styles ──────────────────────── */

/* Office section */
.raf-office-section {
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 14px 24px;
}
.raf-office-grid {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.raf-office-left { flex: 1; }
.raf-office-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.raf-office-rows { display: flex; flex-direction: column; gap: 6px; }
.raf-office-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #444;
}
.raf-office-line {
  flex: 1;
  border-bottom: 1px solid #aaa;
  min-width: 60px;
  height: 16px;
}
.raf-office-right { flex: 0 0 120px; }
.raf-stamp-box {
  border: 1px dashed #bbb;
  height: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #aaa;
  border-radius: 4px;
  text-align: center;
  padding: 6px;
  line-height: 1.5;
}

/* Photo upload section */
.raf-photo-section {
  padding: 14px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
}
.raf-photo-row { display: flex; justify-content: flex-end; }
.raf-photo-label-top {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  display: block;
  margin-bottom: 6px;
  text-align: center;
}
.raf-photo-drop {
  width: 110px;
  height: 130px;
  min-height: unset;
}
#raf-photo-preview { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }

/* Bangla labels */
.raf-label-bangla {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 8px;
  display: block;
}
.raf-section-title-bangla {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a5c;
  background: #eaf0f6;
  padding: 6px 12px;
  border-left: 4px solid #1a3a5c;
  border-radius: 2px;
  margin-bottom: 14px;
}

/* Inline field layouts */
.raf-field-inline { display: flex; flex-direction: column; gap: 6px; }
.raf-field-block  { display: flex; flex-direction: column; gap: 8px; }
.raf-input-inline {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--raf-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.raf-input-inline:focus { outline: none; border-color: var(--raf-accent); box-shadow: 0 0 0 3px rgba(46,134,193,.15); }
.raf-select-inline {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--raf-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .15s;
}
.raf-select-inline:focus { outline: none; border-color: var(--raf-accent); box-shadow: 0 0 0 3px rgba(46,134,193,.15); }

/* 4-column grid */
.raf-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 680px) { .raf-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .raf-grid-4 { grid-template-columns: 1fr; } }

/* Radio group */
.raf-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 4px;
}
.raf-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  font-weight: 400;
}
.raf-radio-label input[type="radio"] { margin: 0; cursor: pointer; }

/* Same address checkbox */
.raf-same-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  margin-top: 6px;
}

/* Declaration */
.raf-declaration-section { background: #fffdf0; border-left: 4px solid #e67e22; }
.raf-declaration-text {
  font-size: 12.5px;
  color: #333;
  line-height: 1.9;
  text-align: justify;
}
.raf-declaration-text strong { color: #1a3a5c; }

/* Signature section */
.raf-signature-row-section { padding-bottom: 24px; }
.raf-sig-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.raf-sig-box { width: 45%; text-align: center; }
.raf-sig-line {
  border-top: 1px solid #555;
  padding-top: 5px;
  font-size: 12px;
  color: #555;
  margin-top: 30px;
}
.raf-sig-row-office .raf-sig-line { margin-top: 20px; }

/* Override submit row labels */
.raf-btn-submit { font-size: 14px; padding: 11px 28px; }
