/* =====================================================================
   صفحه‌های «تحصیل در …» — افزوده بر country.css
   ===================================================================== */

/* کارت دانشجویی شناور (به‌جای کارت پرواز در قهرمان) */
.l-card {
  right: 0; bottom: 5%; width: 290px; border-radius: 12px; overflow: hidden; color: #111;
  transform: translateZ(140px) rotate(-8deg);
  box-shadow: 0 2px 2px rgba(0,0,0,.1), calc(var(--mx) * -26px) calc(30px + var(--my) * -20px) 40px -18px rgba(0,0,0,.5);
}
.sc__top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #111; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .12em; direction: ltr; }
.sc__body { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding: 14px; direction: ltr; text-align: left; }
.sc__photo { aspect-ratio: 3 / 4; border: 1.5px solid #2b2927; border-radius: 4px; display: grid; place-items: end center; overflow: hidden; background: #f3f2ee; }
.sc__photo svg { width: 86%; height: auto; }
.sc__rows { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc__rows small { display: block; font-size: 9px; letter-spacing: .12em; color: #777; }
.sc__rows b { display: block; font-size: 13px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc__bar { height: 22px; margin: 0 14px 12px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 13px); }

/* ---------- قفسه‌ی کتاب سه‌بعدی: هر کتاب یک مقطع ---------- */
.shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 50px; align-items: center; }
.shelf__stage { position: relative; perspective: 1100px; padding: 40px 10px 0; }
.shelf__books { display: flex; align-items: flex-end; justify-content: center; gap: 10px; min-height: 300px; transform-style: preserve-3d; }
.book {
  --h: 260px; --w: 70px;
  position: relative; width: var(--w); height: var(--h); padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; transform-origin: 50% 100%;
  transition: transform .7s cubic-bezier(.2, .9, .25, 1.15);
}
.book:hover { transform: translateY(-8px); }
.book[aria-selected="true"] { transform: translateY(-34px) translateZ(70px) rotateY(-22deg); }
.book:focus-visible { outline: none; }
.book:focus-visible .book__spine { outline: 2px solid #111; outline-offset: 4px; }
.book__spine {
  position: absolute; inset: 0; border-radius: 4px 4px 2px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 16px 0 14px;
  box-shadow: inset 0 0 0 1.5px #2b2927, 0 14px 18px -12px rgba(0,0,0,.45);
  background-color: #fbfaf6;
}
.book--dark .book__spine { background: linear-gradient(90deg, #2a2a2a, #111 40%, #1c1c1c); box-shadow: inset 0 0 0 1.5px #000, 0 14px 18px -12px rgba(0,0,0,.5); color: #fff; }
.book__spine::before, .book__spine::after { content: ""; position: absolute; left: 6px; right: 6px; height: 2px; background: currentColor; opacity: .55; }
.book__spine::before { top: 30px; } .book__spine::after { bottom: 40px; }
.book__title { writing-mode: vertical-rl; display: block; flex: 1 1 auto; min-height: 0; margin: 26px 0 34px; overflow: hidden; text-align: center; font-size: 15px; font-weight: 700; color: inherit; white-space: nowrap; }   /* وسط عطف، بین دو نوار */
.book__lat { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; opacity: .7; direction: ltr; }
.book { color: #111; }
.book--dark { color: #fff; }
/* ضخامت کتاب (صفحه‌ها) — فقط وقتی کتاب می‌چرخد دیده می‌شود */
.book__pages {
  position: absolute; top: 4px; bottom: 4px; right: 0; width: 56px; transform-origin: 100% 50%; transform: rotateY(90deg);
  background: repeating-linear-gradient(90deg, #f5f3ee 0 2px, #dcd9d2 2px 3px); border: 1px solid #2b2927;
}
.shelf__board {
  position: relative; height: 18px; margin: 0 -10px; border-radius: 3px;
  background: linear-gradient(180deg, #2b2b2b, #0e0e0e); box-shadow: 0 18px 24px -14px rgba(0,0,0,.55);
}
.shelf__board::after { content: ""; position: absolute; left: 6%; right: 6%; top: 100%; height: 26px; background: linear-gradient(180deg, rgba(0,0,0,.18), transparent); clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%); }
.shelf__hint { margin: 30px 0 0; text-align: center; font-size: 13px; color: #8a8884; }

.shelf__panel { position: relative; padding: 34px 32px 30px; border-radius: 6px; min-height: 300px; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 26px 40px -28px rgba(0,0,0,.45); }
.shelf__panel > * { transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.shelf__panel.is-swap > * { opacity: 0; transform: translateY(10px); }
.shelf__panel small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #8a8884; direction: ltr; text-align: right; }
.shelf__panel h3 { margin: 4px 0 12px; font-size: 24px; font-weight: 700; color: #111; }
.shelf__panel p { margin: 0 0 14px; font-size: 15px; line-height: 2.05; color: #3f3d3a; text-align: justify; text-align-last: right; }

/* ---------- رشته‌های پرطرفدار: کارت‌های فهرست ---------- */
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.field-card {
  position: relative; padding: 24px 20px 22px; border-radius: 4px; perspective: 700px;
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 18px 28px -22px rgba(0,0,0,.45);
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(43,41,39,.09) 27px 28px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-color: #fbfaf6; background-position: 0 48px, 0 0;
  transform: rotate(var(--r, 0deg)); transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease;
}
.field-card:nth-child(2n) { --r: .8deg; } .field-card:nth-child(2n+1) { --r: -.7deg; }
.field-card:hover { transform: rotate(0) translateY(-6px) rotateX(6deg); box-shadow: 0 2px 2px rgba(0,0,0,.08), 0 30px 36px -24px rgba(0,0,0,.5); }
.field-card::before { content: ""; position: absolute; top: 0; bottom: 0; right: 16px; width: 1px; background: rgba(43,41,39,.25); }
.field-card b { display: block; margin-bottom: 8px; padding-right: 10px; font-size: 17px; color: #111; }
.field-card span { display: block; padding-right: 10px; font-size: 13.5px; line-height: 2.05; color: #55534f; }

/* ---------- هزینه و بورسیه: برگه‌ی خط‌دار سه‌بعدی ---------- */
.fund { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; perspective: 1400px; }
.fund .sheet { opacity: 1; transform: rotateY(-8deg) rotateX(3deg); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.fund .sheet:hover { transform: rotateY(0) rotateX(0); }

@media (max-width: 980px) {
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fund { grid-template-columns: minmax(0, 1fr); }
  .fund .sheet { transform: none; }
}
@media (max-width: 560px) {
  .l-card { width: 220px; right: -1%; bottom: 2%; }
  .sc__body { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .sc__rows b { font-size: 11px; }
  .sc__bar { height: 16px; }
  .shelf__books { gap: 6px; min-height: 250px; }
  .book { --w: 62px; }
  .book[aria-selected="true"] { transform: translateY(-26px) translateZ(50px) rotateY(-18deg); }
  .book__title { font-size: 13.5px; }
  .shelf__panel { padding: 26px 20px 22px; min-height: 0; }
  .fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .book, .shelf__panel > *, .field-card { transition: none; }
}

/* متن فقط برای صفحه‌خوان‌ها و موتورهای جست‌وجو */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
