/* ============================================
   Burs başvurusu ve başvuru sorgulama ekranları
   (index.css içindeki .page-section / .page-form üzerine)
   ============================================ */

.apply-lead {
  font-size: 17px;
  color: var(--grey);
}

/* Adım göstergesi */
.apply-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 24px 0 32px;
  padding: 0;
  counter-reset: step;
}

.apply-steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  border-radius: 100px;
  background: #f8f7f5;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.apply-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: var(--grey);
}

.apply-steps li.is-done {
  background: #d9d9d9;
  color: var(--grey);
}

.apply-steps li.is-current {
  background: var(--grey);
  color: #fff;
}

.apply-steps li.is-current::before {
  background: var(--yellow);
  color: var(--on-yellow);
}

/* Bölüm göstergesi (apply-form.js): header'ın altına yapışan şerit */
.apply-progress {
  position: sticky;
  top: 115px;
  z-index: 50;
  margin: 0 0 24px;
  padding: 12px 0;
  background: #ffffff;
  border-bottom: 1px solid #ececec;
}

.apply-progress__count {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey);
}

.apply-progress__list {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.apply-progress__list::-webkit-scrollbar {
  display: none;
}

.apply-progress__list.has-next {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}

.apply-progress__list.has-prev {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px);
  mask-image: linear-gradient(to right, transparent, #000 48px);
}

.apply-progress__list.has-prev.has-next {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

.apply-progress__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border: 1px solid #d9d9d9;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.apply-progress__list a:hover {
  border-color: var(--grey);
}

.apply-progress__list a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.apply-progress__mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  background: #ffffff;
}

/* Tamamlanan bölüm: turuncu daire içinde onay işareti */
.apply-progress__list .is-done .apply-progress__mark {
  border-color: var(--yellow);
  background: var(--yellow);
}

.apply-progress__list .is-done .apply-progress__mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--on-yellow, #3e3739);
  border-bottom: 2px solid var(--on-yellow, #3e3739);
  transform: rotate(45deg);
}

/* Bulunulan bölüm */
.apply-progress__list .is-current a {
  border-color: var(--grey);
  background: var(--grey);
  color: #ffffff;
}

/* Bölüm başlığına gidince yapışan header ve şeridin altında kalmaz */
form[data-section-nav] .apply-fieldset {
  scroll-margin-top: 220px;
}

@media (max-width: 575px) {
  .apply-progress {
    top: 80px;
  }

  form[data-section-nav] .apply-fieldset {
    scroll-margin-top: 180px;
  }
}

/* Form bölümleri */
.apply-fieldset {
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  padding: 24px;
  margin: 0 0 24px;
}

.apply-fieldset legend {
  font-size: 18px;
  font-weight: 700;
  color: var(--grey);
  padding: 0 8px;
}

.page-form select {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-family: inherit;
  background: #fff;
}

.page-form input:focus,
.page-form textarea:focus,
.page-form select:focus,
.apply-choice input:focus-visible + span,
.apply-btn:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.page-form input[type="checkbox"],
.page-form input[type="radio"] {
  width: auto;
  margin: 0;
}

.page-form input[type="file"] {
  padding: 10px;
  background: #f8f7f5;
}

.apply-hint {
  display: block;
  margin: -6px 0 12px;
  font-size: 14px;
  color: #6b7280;
}

.apply-question {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}

.apply-question > legend {
  float: none;
  width: auto;
  padding: 0;
}

.apply-question > .apply-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Evet/Hayır ve seçenek düğmeleri */
.apply-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apply-choice {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  margin: 0 !important;
  font-weight: 400 !important;
}

.apply-choice input {
  position: absolute;
  opacity: 0;
}

.apply-choice span {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #d9d9d9;
  border-radius: 100px;
  background: #fff;
  transition: all 0.2s ease;
}

.apply-choice input:checked + span {
  background: var(--grey);
  border-color: var(--grey);
  color: #fff;
}

.apply-check {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400 !important;
  margin-bottom: 12px !important;
}

.apply-check input {
  margin-top: 5px !important;
  flex-shrink: 0;
}

.apply-check a {
  color: var(--grey);
  text-decoration: underline;
}

/* Hata ve bilgi kutuları */
.apply-alert {
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.apply-alert ul {
  margin: 0;
  padding-left: 18px;
}

.apply-alert--error {
  background: rgba(244, 118, 33, 0.1);
  color: #3e3739;
}

.apply-alert--success {
  background: rgba(90, 107, 125, 0.12);
  color: #3e3739;
}

.apply-alert--info {
  background: #f8f7f5;
  color: #3e3739;
}

.apply-error {
  display: block;
  margin: -6px 0 12px;
  color: var(--yellow-text, #a86400);
  font-size: 14px;
}

.is-invalid {
  border-color: #f47621 !important;
}

/* Butonlar */
.apply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.apply-btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.btn-grey-outline {
  background: transparent;
  border: 1px solid var(--grey);
  border-radius: 100px;
  color: var(--grey);
}

.btn-grey-outline span {
  color: var(--grey);
  font-size: 16px;
}

.apply-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--grey);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}

/* Program kartları */
.apply-program {
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.apply-program__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--grey);
  margin-bottom: 4px;
}

.apply-program__meta {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.apply-program--muted {
  background: #f8f7f5;
}

.apply-program--muted .apply-program__title {
  color: #6b7280;
}

.apply-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: #f8f7f5;
  color: var(--grey);
}

.apply-badge--warning {
  background: rgba(250, 163, 26, 0.12);
  color: #3e3739;
}

.apply-badge--success {
  background: rgba(90, 107, 125, 0.12);
  color: #3e3739;
}

.apply-badge--danger {
  background: rgba(244, 118, 33, 0.1);
  color: #3e3739;
}

/* Burs Programları sayfasında seçilen program */
.apply-program--preferred {
  border-color: var(--yellow, #faa31a);
  box-shadow: 0 0 0 1px var(--yellow, #faa31a);
}

.apply-badge--preferred {
  margin-bottom: 8px;
  background: rgba(250, 163, 26, 0.12);
  color: #3e3739;
}

/* Belgeler */
.apply-doc {
  border: 1px solid #d9d9d9;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
}

.apply-doc__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.apply-doc__title {
  font-weight: 700;
  color: var(--grey);
}

.apply-doc__files {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.apply-doc__files li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #d9d9d9;
  font-size: 15px;
  word-break: break-all;
}

.apply-doc__upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.apply-doc__upload input {
  flex: 1 1 260px;
  margin-bottom: 0 !important;
}

/* Başvuru numarası */
.apply-reference {
  display: inline-block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--grey);
  background: #f8f7f5;
  border-radius: 16px;
  padding: 12px 24px;
  margin: 8px 0 16px;
}

/* Diğer burs satırları */
.apply-other-row {
  border-top: 1px dashed #d9d9d9;
  padding-top: 12px;
  margin-top: 4px;
}

/* SSS */
.apply-faq details {
  border-bottom: 1px solid #d9d9d9;
  padding: 16px 0;
}

.apply-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--grey);
  list-style: none;
}

.apply-faq summary::-webkit-details-marker {
  display: none;
}

/* Açılınca dönen ok */
.apply-faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.3s ease;
}

.apply-faq details[open]:not(.is-closing) > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.apply-faq summary:hover,
.apply-faq details[open]:not(.is-closing) > summary {
  color: var(--yellow-text);
}

.apply-faq summary:focus-visible {
  outline: 2px solid var(--yellow-text);
  outline-offset: 4px;
}

/* Cevap yüksekliği common.js ile yumuşak açılır/kapanır */
.apply-faq__answer {
  overflow: hidden;
}

.apply-faq details p {
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .apply-faq summary::after {
    transition: none;
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .apply-fieldset {
    padding: 16px;
    border-radius: 16px;
  }

  .apply-reference {
    font-size: 22px;
  }
}

/* Gönderim onay penceresi (çerez penceresiyle aynı görünüm) */
.apply-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.apply-modal[hidden] {
  display: none;
}

.apply-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.apply-modal__dialog {
  position: relative;
  background: #fff;
  color: var(--grey, #3e3739);
  border-radius: 24px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.apply-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.apply-modal__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.apply-modal__close {
  background: none;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.apply-modal__close:focus-visible {
  outline: 3px solid var(--yellow, #faa31a);
  outline-offset: 2px;
}

.apply-modal__program,
.apply-modal__text {
  margin: 0 0 16px;
}

.apply-modal .apply-alert {
  margin-bottom: 0;
}

.apply-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

body.apply-modal-open {
  overflow: hidden;
}

@media (max-width: 575px) {
  .apply-modal__dialog {
    padding: 20px;
  }

  .apply-modal__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Başvurumu Sorgula: durum kartı (kullanıcı isteği: onay yeşil tik, ret kırmızı çarpı) */
.apply-status {
  --status-color: var(--yellow-text, #a86400);
  --status-bg: rgba(250, 163, 26, 0.12);
  display: flex;
  gap: 24px;
  align-items: flex-start;
  border: 1px solid #d9d9d9;
  border-left: 6px solid var(--status-color);
  border-radius: 24px;
  padding: 28px;
  margin: 24px 0;
  background: #fff;
}

.apply-status--success {
  --status-color: #2e7d32;
  --status-bg: rgba(46, 125, 50, 0.1);
}

.apply-status--error {
  --status-color: #c62828;
  --status-bg: rgba(198, 40, 40, 0.1);
}

.apply-status--warning {
  --status-color: #f47621;
  --status-bg: rgba(244, 118, 33, 0.12);
}

.apply-status__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--status-color);
  background: var(--status-bg);
}

.apply-status__body {
  min-width: 0;
}

.apply-status__label {
  margin: 0 0 4px;
  font-size: 14px;
  color: #6b7280;
}

.apply-status__title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--status-color);
}

.apply-status--info .apply-status__title {
  color: var(--grey, #3e3739);
}

.apply-status__text {
  margin: 0;
  font-size: 16px;
  color: var(--grey, #3e3739);
}

.apply-status__details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px dashed #d9d9d9;
}

.apply-status__details dt {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
}

.apply-status__details dd {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--grey, #3e3739);
}

/* Süreç adımları */
.apply-track {
  list-style: none;
  display: flex;
  margin: 0 0 32px;
  padding: 0;
}

.apply-track__step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}

/* Adımlar arası çizgi */
.apply-track__step + .apply-track__step::before {
  content: "";
  position: absolute;
  top: 17px;
  right: calc(50% + 22px);
  left: calc(-50% + 22px);
  height: 2px;
  background: #d9d9d9;
}

.apply-track__step--done + .apply-track__step::before,
.apply-track__step--done + .apply-track__step--done::before {
  background: #2e7d32;
}

.apply-track__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid #d9d9d9;
  background: #fff;
  color: #9ca3af;
}

.apply-track__step--done {
  color: var(--grey, #3e3739);
}

.apply-track__step--done .apply-track__dot {
  border-color: #2e7d32;
  background: #2e7d32;
  color: #fff;
}

.apply-track__step--current {
  color: var(--grey, #3e3739);
  font-weight: 600;
}

.apply-track__step--current .apply-track__dot {
  border-color: var(--yellow, #faa31a);
  background: var(--yellow, #faa31a);
  color: var(--on-yellow, #3e3739);
}

.apply-track__step--failed {
  color: #c62828;
  font-weight: 600;
}

.apply-track__step--failed .apply-track__dot {
  border-color: #c62828;
  background: #c62828;
  color: #fff;
}

@media (max-width: 575px) {
  .apply-status {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .apply-status__icon {
    width: 52px;
    height: 52px;
  }

  .apply-status__title {
    font-size: 22px;
  }

  .apply-track__step {
    font-size: 12px;
  }
}

/* Uygunluk sayfası başlığı: uzun giriş metni daralır, "Başvurumu Sorgula" sağda kalır (mobilde alta iner) */
.apply-head > div:first-child {
  flex: 1 1 320px;
  max-width: 900px;
}
