/* ================================================================
   TRACKS.CSS — Listening, Reading, Vocab & Flashcard Layouts
   Grammar Strategies — Ayed Academy
   ================================================================ */

/* ── LISTENING SECTION ── */
.listening-unit { padding: 1.5rem 0; }

.ls-section-header { display: flex; align-items: center; justify-content: center; gap: 1rem; background: linear-gradient(135deg, #F5A623 0%, #E08010 100%); border-radius: 16px; padding: 1rem 2rem; margin-bottom: 2rem; box-shadow: 0 4px 20px rgba(245,166,35,0.3); }
.ls-header-ar { font-size: 2rem; font-weight: 900; color: #fff; font-family: var(--ff-ar); }
.ls-header-en { font-size: 1.4rem; font-weight: 700; color: rgba(255,255,255,0.9); font-family: var(--ff-en); direction: ltr; }
.ls-header-icon { font-size: 2.5rem; }

.ls-info-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem 2rem; margin-bottom: 1.5rem; box-shadow: var(--sh-sm); }
.ls-info-title { font-size: 1.1rem; font-weight: 800; color: var(--gold); margin-bottom: 1rem; text-align: center; text-decoration: underline; text-underline-offset: 4px; }
.ls-info-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.5rem 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
.ls-info-row:last-of-type { border-bottom: none; }
.ls-info-icon { font-size: 1.2rem; }
.ls-info-label { font-weight: 700; color: var(--gold); min-width: 130px; }
.ls-info-val { color: var(--text-primary); font-weight: 600; }
.ls-format-title { font-weight: 800; color: var(--text-primary); margin: 1.2rem 0 0.5rem; font-size: 1.05rem; }
.ls-format-body { color: var(--red); font-weight: 600; margin-bottom: 0.5rem; }
.ls-format-row { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.4rem; font-size: 0.95rem; color: var(--text-primary); }
.ls-format-icon { font-size: 1.2rem; margin-top: 1px; }

.ls-strategy-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 2rem; overflow: hidden; box-shadow: var(--sh-sm); }
.ls-strategy-banner { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.5rem; font-size: 1.2rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0a1929, #1a3050); }
.ls-strategy-banner.sc-theme-blue { background: linear-gradient(135deg, #1e40af, #2563eb); }
.ls-strategy-banner.sc-theme-red { background: linear-gradient(135deg, #991b1b, #dc2626); }
.ls-strategy-banner.sc-theme-teal { background: linear-gradient(135deg, #0e7490, #0891b2); }
.ls-strategy-banner.sc-theme-green { background: linear-gradient(135deg, #065f46, #059669); }
.ls-strategy-banner.sc-theme-purple { background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.ls-strategy-banner.sc-theme-gold { background: linear-gradient(135deg, #92400e, #d97706); }
.ls-strategy-subtitle { font-size: 0.8rem; font-weight: 400; margin-right: auto; opacity: 0.85; font-family: var(--ff-en); direction: ltr; }
.ls-usage-box { background: rgba(245,166,35,0.08); border-right: 4px solid var(--gold); padding: 1rem 1.5rem; font-size: 0.95rem; line-height: 1.8; color: var(--text-primary); }
.ls-exception-box { background: rgba(239,35,60,0.05); border: 1px solid rgba(239,35,60,0.2); border-radius: 10px; padding: 1rem 1.5rem; margin: 1rem 1.5rem; }
.ls-exception-title { font-weight: 800; color: var(--red); margin-bottom: 0.5rem; }
.ls-exception-body { color: var(--text-primary); line-height: 1.8; font-size: 0.95rem; }

/* Keywords Arrow Grid */
.ls-keywords-grid { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.ls-kw-row { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem; background: rgba(245,166,35,0.06); border-radius: 8px; }
.ls-kw-en { font-family: var(--ff-en); font-weight: 700; color: var(--text-primary); min-width: 140px; direction: ltr; }
.ls-arrow { color: var(--red); font-size: 1.2rem; font-weight: 900; }
.ls-kw-ar { font-weight: 600; color: var(--text-sec); }

/* Split Screen Layout */
.ls-split-wrap { display: grid; grid-template-columns: 1fr 1fr; direction: ltr; border: 2px solid var(--border); border-radius: 12px; margin: 1.2rem 1.5rem; overflow: hidden; min-height: 220px; }
.ls-split-left { background: #f0f7ff; border-left: 1px solid var(--border); padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.ls-split-instructions { font-size: 0.82rem; color: var(--text-sec); line-height: 1.7; font-family: var(--ff-en); direction: ltr; text-align: left; background: rgba(59,130,246,0.08); border-radius: 8px; padding: 0.7rem; border: 1px solid rgba(59,130,246,0.2); }
.ls-split-right { padding: 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.ls-split-qnum { font-weight: 800; font-size: 1rem; color: var(--text-primary); line-height: 1.5; }

/* Radio Style Options */
.ls-radio-opts { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 0; }
.ls-radio-opt { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 1rem; border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s; background: var(--surface2); direction: ltr; text-align: left; }
.ls-radio-opt:hover { border-color: var(--gold); background: rgba(245,166,35,0.04); }
.ls-radio-opt.selected { border-color: var(--gold); background: rgba(245,166,35,0.1); }
.ls-radio-opt.correct { border-color: var(--green); background: rgba(6,214,160,0.1); }
.ls-radio-opt.wrong { border-color: var(--red); background: rgba(239,35,60,0.08); }
.ls-radio-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex-shrink: 0; color: var(--text-primary); font-family: var(--ff-en); }
.ls-radio-opt.selected .ls-radio-letter { background: var(--gold); color: var(--navy); }
.ls-radio-opt.correct .ls-radio-letter { background: var(--green); color: #fff; }
.ls-radio-opt.wrong .ls-radio-letter { background: var(--red); color: #fff; }
.ls-radio-text { font-family: var(--ff-en); font-size: 0.95rem; color: var(--text-primary); direction: ltr; }

/* Vocab Section */
.ls-vocab-section { margin-bottom: 2.5rem; }
.ls-vocab-category-title { font-size: 1.5rem; font-weight: 900; text-align: center; margin-bottom: 1rem; font-family: var(--ff-en), var(--ff-ar); letter-spacing: 1px; }
.ls-split-right .btn-check-ans { direction: rtl; }
.ls-split-right .mini-expl { direction: rtl; text-align: right; }

/* ── READING SECTION ── */
.reading-unit { padding: 1.5rem 0; }

.rd-section-header { display: flex; align-items: center; justify-content: center; gap: 1rem; background: linear-gradient(135deg, #10b981 0%, #059669 100%); border-radius: 16px; padding: 1rem 2rem; margin-bottom: 2rem; box-shadow: 0 4px 20px rgba(16,185,129,0.3); }
.rd-header-ar { font-size: 2rem; font-weight: 900; color: #fff; font-family: var(--ff-ar); }
.rd-header-en { font-size: 1.4rem; font-weight: 700; color: rgba(255,255,255,0.9); font-family: var(--ff-en); direction: ltr; }
.rd-header-icon { font-size: 2.5rem; }

.rd-strategy-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 2rem; overflow: hidden; box-shadow: var(--sh-sm); }
.rd-strategy-banner { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.5rem; font-size: 1.2rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0a1929, #1a3050); }
.rd-strategy-banner.sc-theme-blue { background: linear-gradient(135deg, #1e40af, #2563eb); }
.rd-strategy-banner.sc-theme-red { background: linear-gradient(135deg, #991b1b, #dc2626); }
.rd-strategy-subtitle { font-size: 0.8rem; font-weight: 400; margin-right: auto; opacity: 0.85; font-family: var(--ff-en); direction: ltr; }
.rd-usage-box { background: rgba(16,185,129,0.08); border-right: 4px solid #10b981; padding: 1rem 1.5rem; font-size: 0.95rem; line-height: 1.8; color: var(--text-primary); }
.rd-keywords-grid { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.rd-kw-row { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem; background: rgba(16,185,129,0.06); border-radius: 8px; }
.rd-kw-en { font-family: var(--ff-en); font-weight: 700; color: var(--text-primary); direction: ltr; }
.rd-arrow { color: var(--green); font-size: 1.2rem; font-weight: 900; }
.rd-kw-ar { font-weight: 600; color: var(--text-sec); }

.rd-split-wrap { display: grid; grid-template-columns: 1fr 1fr; direction: ltr; border: 2px solid var(--border); border-radius: 12px; margin: 1.2rem 1.5rem; overflow: hidden; min-height: 300px; }
.rd-split-left { background: #f0fdf4; border-right: 1px solid var(--border); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.rd-passage-text { font-size: 0.95rem; color: var(--text-primary); line-height: 1.8; font-family: var(--ff-en); direction: ltr; text-align: justify; }
.rd-passage-img { width: 100%; max-width: 400px; height: auto; margin: 0 auto; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.rd-split-right { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.rd-split-qnum { font-weight: 800; font-size: 1.1rem; color: var(--text-primary); line-height: 1.5; }

/* ── FLASHCARDS ── */
.flashcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.2rem; padding: 0.5rem; }
.flashcard { background-color: transparent; height: 120px; perspective: 1000px; cursor: pointer; }
.flashcard-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s cubic-bezier(0.4,0.2,0.2,1); transform-style: preserve-3d; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 12px; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.flashcard-front { border-bottom-width: 4px; }
.fc-en { font-family: var(--ff-en); font-weight: 800; font-size: 1.15rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.fc-hint { font-size: 0.75rem; color: var(--text-muted); opacity: 0.8; }
.flashcard-back { transform: rotateY(180deg); border-bottom-width: 4px; border-bottom-color: var(--gold); }
.fc-ar { font-family: var(--ff-ar); font-weight: 800; font-size: 1.2rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.fc-sound-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0.7; transition: opacity 0.2s; padding: 0.2rem; }
.fc-sound-btn:hover { opacity: 1; transform: scale(1.1); }

/* ── RESPONSIVE TRACKS ── */
@media (max-width: 640px) {
  .ls-split-wrap { grid-template-columns: 1fr; }
  .ls-header-ar { font-size: 1.4rem; }
  .ls-header-en { font-size: 1rem; }
}
@media (max-width: 768px) {
  .rd-split-wrap { grid-template-columns: 1fr; }
  .rd-split-left { border-right: none; border-bottom: 1px solid var(--border); }
  .rd-header-ar { font-size: 1.4rem; }
  .rd-header-en { font-size: 1rem; }
}
