/* Alıştırma detay sayfası (sayfaya özel) */

.ad { padding: 36px 0 90px; }
.ad-inner { display: flex; flex-direction: column; }
.ad h2 { font-weight: 600; font-size: 18px; line-height: 27px; color: var(--ink); }

.ad-crumb { font-size: 13px; line-height: 20px; color: #6B7280; }
.ad-crumb a:hover { color: var(--blue); }

/* Hero */
.ad-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 24px;
  padding: 32px 38px;
  background: var(--gray);
  border-radius: 28px;
}
.ad-cover {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  background: #E8EEF9;
}
.ad-cover span { font-weight: 600; font-size: 9px; line-height: 14px; letter-spacing: 0.08em; color: rgba(23, 70, 158, 0.5); text-align: center; }
.ad-cover img, .ad-nb-thumb img, .ad-viewer img, .ad-pdf-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ad-hero-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.ad-eyebrow { font-weight: 600; font-size: 12px; line-height: 18px; letter-spacing: 0.12em; color: var(--blue); }
.ad-hero-text h1 {
  margin-top: 10px;
  font-weight: 600;
  font-size: 32px;
  line-height: 118%;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.ad-hero-text p { margin-top: 8px; font-size: 14px; line-height: 21px; color: var(--text); }
.ad-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ad-tags span {
  padding: 9px 17px;
  background: #fff;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  color: var(--menu);
}
.ad-hero-actions { flex: none; display: flex; flex-direction: column; gap: 10px; }
.ad-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  white-space: nowrap;
  transition: opacity .2s;
}
.ad-btn:hover { opacity: .9; }
.ad-btn-primary { background: var(--blue); color: #fff; }
.ad-btn-primary:hover { color: #fff; }
.ad-btn-outline { background: #fff; border-color: var(--border-blue); color: var(--blue); }

/* Önceki / sonraki */
.ad-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 14px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.ad-pager a { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-pager a:hover strong { color: var(--blue); }
.ad-arrow { flex: none; font-size: 14px; line-height: 21px; color: var(--blue); }
.ad-pager-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-pager-text small { font-size: 11px; line-height: 16px; color: #6B7280; }
.ad-pager-text strong { font-weight: 500; font-size: 14px; line-height: 21px; color: var(--ink); }
.ad-pager-next .ad-pager-text { text-align: right; }
.ad-pager-mid { font-size: 12px; line-height: 18px; color: #9AA2B1; text-align: center; }

/* Nota görseli */
.ad-score {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
  padding: 24px 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
}
.ad-score-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ad-score-tools { display: flex; align-items: center; gap: 18px; }
.ad-score-tools span { font-size: 13px; line-height: 20px; color: #6B7280; }
.ad-score-tools button {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--gray);
  font-family: inherit;
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  color: var(--blue);
  white-space: nowrap;
}
.ad-score-tools button:hover { background: var(--blue-soft); }
.ad-score-body { display: flex; align-items: flex-start; gap: 16px; }
.ad-viewer {
  position: relative;
  flex: 0 0 485px;
  height: 535px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  overflow: hidden;
  background: #E8EEF9;
}
.ad-viewer-ph { font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: 0.1em; color: rgba(23, 70, 158, 0.5); text-align: center; padding: 0 16px; }
.ad-viewer img { object-fit: contain; transform-origin: center; transition: transform .15s; cursor: zoom-in; }
.ad-score-body:fullscreen { display: flex; flex-direction: row; align-items: stretch; gap: 16px; width: 100vw; height: 100vh; padding: 16px; background: #fff; box-sizing: border-box; }
.ad-score-body:fullscreen .ad-viewer { flex: 1 1 0; width: auto; height: 100%; border-radius: 12px; }
.ad-score-body:fullscreen .ad-pdfs { flex: 0 0 300px; width: 300px; overflow-y: auto; }

.ad-pdfs { flex: 1 1 0; min-width: 0; height: 535px; display: flex; flex-direction: column; }
.ad-pdfs h3 { flex: none; margin-bottom: 8px; font-weight: 500; font-size: 15px; line-height: 22px; color: var(--ink); }
.ad-pdf-list { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 4px; }

.ad-pdf-list, .ad-doc {
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 70, 158, 0.22) transparent;
}
.ad-pdf-list::-webkit-scrollbar, .ad-doc::-webkit-scrollbar { width: 6px; }
.ad-pdf-list::-webkit-scrollbar-track, .ad-doc::-webkit-scrollbar-track { background: transparent; }
.ad-pdf-list::-webkit-scrollbar-thumb, .ad-doc::-webkit-scrollbar-thumb {
  background: rgba(23, 70, 158, 0.22);
  border-radius: 999px;
}
.ad-pdf-list::-webkit-scrollbar-thumb:hover, .ad-doc::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 70, 158, 0.4);
}
.ad-pdf {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s;
}
.ad-pdf:hover, .ad-pdf.is-active { border-color: var(--blue); }
.ad-pdf.is-active { background: var(--blue-soft); }
.ad-viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ad-pdf-thumb {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--blue-soft);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--blue);
}
.ad-pdf > span:last-child { min-width: 0; font-weight: 500; font-size: 13px; line-height: 20px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ses kayıtları + Bu alıştırma */
.ad-cols {
  display: grid;
  grid-template-columns: 733fr 473fr;
  gap: 34px;
  align-items: start;
  margin-top: 44px;
}
.ad-audio h2, .ad-info h2 { margin-bottom: 16px; }
.ad-info { position: sticky; top: 24px; }
.ad-tracks { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.ad-track { display: flex; align-items: center; gap: 18px; padding: 15px 22px; transition: background .2s; }
.ad-track + .ad-track { border-top: 1px solid var(--border); }
.ad-track:hover { background: var(--gray); }
.ad-no { flex: none; width: 20px; font-size: 13px; line-height: 20px; color: #6B7280; }
.ad-play {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--gray);
  transition: background .2s;
}
.ad-play i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: -7px 0 0 -5px;
  border-left: 12px solid var(--blue);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.ad-track.is-active .ad-play { background: var(--blue); }
.ad-track.is-active .ad-play i { border-left-color: #fff; }
.ad-track.is-playing .ad-play i {
  width: 12px;
  height: 14px;
  margin: -7px 0 0 -6px;
  border: 0;
  background: linear-gradient(90deg, #fff 0 4px, transparent 4px 8px, #fff 8px 12px);
}
.ad-track-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ad-track-text strong { font-weight: 500; font-size: 15px; line-height: 22px; color: var(--ink); }
.ad-track-text small { font-size: 12px; line-height: 18px; color: #6B7280; }
.ad-dl { flex: none; font-size: 13px; line-height: 20px; color: var(--blue); }
.ad-time { flex: none; font-size: 13px; line-height: 20px; color: #6B7280; }
.ad-note { padding-top: 14px; font-size: 12px; line-height: 160%; color: #6B7280; }

.ad-info-list { margin: 0; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.ad-info-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 22px; }
.ad-info-list > div + div { border-top: 1px solid var(--border); }
.ad-info-list dt { font-weight: 400; font-size: 14px; line-height: 21px; color: #6B7280; }
.ad-info-list dd { margin: 0; font-weight: 500; font-size: 14px; line-height: 21px; color: var(--ink); text-align: right; }
.ad-info-more { display: block; margin-top: 16px; font-weight: 500; font-size: 14px; line-height: 21px; color: var(--blue); }

/* Komşu alıştırmalar */
.ad-nb { margin-top: 34px; }
.ad-nb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ad .ad-nb-head h2 { font-size: 20px; line-height: 30px; letter-spacing: -0.02em; }
.ad-nb-head a { font-weight: 500; font-size: 14px; line-height: 21px; color: var(--blue); white-space: nowrap; }
.ad-nb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 18px; }
.ad-nb-card { display: flex; flex-direction: column; }
.ad-nb-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 221px;
  border-radius: 14px;
  overflow: hidden;
  background: #E8EEF9;
}
.ad-nb-thumb span { font-weight: 600; font-size: 9px; line-height: 14px; letter-spacing: 0.1em; color: rgba(23, 70, 158, 0.5); }
.ad-nb-card h3 { margin-top: 14px; font-weight: 500; font-size: 15px; line-height: 22px; color: var(--ink); }
.ad-nb-card:hover h3 { color: var(--blue); }
.ad-nb-card small { margin-top: 4px; font-size: 13px; line-height: 20px; color: #6B7280; }

/* Responsive */
@media (max-width: 1199.98px) {
  .ad-score-body { flex-direction: column; }
  .ad-viewer { flex: none; width: 100%; height: 420px; }
  .ad-pdfs { width: 100%; height: auto; }
  .ad-pdf-list { overflow-y: visible; }
  .ad-nb-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
  .ad { padding: 28px 0 56px; }
  .ad-hero { flex-wrap: wrap; }
  .ad-hero-actions { flex-direction: row; width: 100%; }
  .ad-hero-actions .ad-btn { flex: 1 1 0; }
  .ad-cols { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
  .ad-info { position: static; }
  .ad-pager-mid { display: none; }
}
@media (max-width: 575.98px) {
  .ad-hero { padding: 24px 20px; gap: 20px; }
  .ad-hero-text h1 { font-size: 26px; }
  .ad-score { padding: 20px 16px; }
  .ad-score-head { flex-direction: column; align-items: flex-start; }
  .ad-score-tools { flex-wrap: wrap; gap: 10px; }
  .ad-viewer { height: 320px; }
  .ad-pager { padding: 12px 16px; }
  .ad-pager-text strong { font-size: 13px; }
  .ad-track { gap: 12px; padding: 14px 16px; }
  .ad-no { display: none; }
  .ad-nb-head { flex-direction: column; gap: 4px; }
  .ad .ad-nb-head h2 { font-size: 18px; }
  .ad-nb-grid { grid-template-columns: 1fr; }
}

/* Alt çalar: üstündeki alanla bitişik olmasın */
.ad .player { margin-top: 34px; }

/* Salt okunur PDF görüntüleyici (PDF.js canvas sayfaları) */
.ad-doc { width: 100%; height: 100%; overflow: auto; padding: 12px; background: #E8EEF9; -webkit-user-select: none; user-select: none; }
.ad-doc canvas { display: block; margin: 0 auto 12px; max-width: 100%; background: #fff; box-shadow: 0 2px 10px rgba(23, 70, 158, 0.15); }
.ad-doc-msg { margin: 0; padding: 24px 12px; text-align: center; font-size: 13px; color: rgba(23, 70, 158, 0.6); }
.ad-doc iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* Dokümanlar: giriş yapmayanlara kilitli (bulanık) görünüm */
.ad-locked-wrap { position: relative; }
.ad-locked-blur { display: flex; align-items: flex-start; gap: 16px; width: 100%; filter: blur(7px); opacity: .75; pointer-events: none; -webkit-user-select: none; user-select: none; }
.ad-fake-page { width: 100%; height: 100%; padding: 26px 22px; background: #fff; border-radius: 6px; }
.ad-fake-page i { display: block; height: 10px; margin-bottom: 16px; border-radius: 4px; background: #d5dced; }
.ad-fake-page i:nth-child(3n) { width: 70%; }
.ad-locked-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; }
.ad-locked-msg strong { font-weight: 600; font-size: 18px; line-height: 1.4; color: var(--ink); }
.ad-locked-msg > span { max-width: 460px; font-size: 14px; line-height: 165%; color: var(--text); }
.ad-locked-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.ad-locked-btn { display: inline-flex; align-items: center; padding: 12px 24px; border-radius: 999px; font-weight: 500; font-size: 14px; }
.ad-locked-primary { background: var(--blue); color: #fff; }
.ad-locked-outline { background: #fff; border: 1px solid var(--border-blue); color: var(--blue); }
