/* ==========================================================================
   CALM MODAL & COMPONENT DESIGN SYSTEM
   High-precision modal overlays, timetables, article readers, note filters, 
   gallery hub, universal search, and announcement system
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 1. UNIVERSAL CALM MODAL ARCHITECTURE                                       */
/* -------------------------------------------------------------------------- */
.calm-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.calm-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Backdrop with Cinematic Blur */
.calm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 22, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
}

/* Modal Dialog Window */
.calm-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1080px;
  max-height: 88vh;
  max-height: 88dvh;
  background: #1f2428;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  transform: scale(0.95) translateY(18px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.calm-modal.active .calm-modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.calm-modal-header {
  padding: 0.75rem 1.25rem;
  background: #191c1f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.calm-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.calm-modal-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--calm-gold);
  line-height: 1.2;
}

.calm-modal-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--calm-cream);
  margin: 0;
  line-height: 1.25;
}

/* Prominent & Elegant Close Button (✕) */
.calm-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--calm-cashmere);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.calm-modal-close:hover {
  background: var(--calm-sienna);
  color: #fff;
  border-color: var(--calm-sienna);
  transform: rotate(90deg) scale(1.08);
}

/* Modal Scrollable Body */
.calm-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Custom Scrollbar */
.calm-modal-body::-webkit-scrollbar {
  width: 6px;
}
.calm-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.calm-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.calm-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--calm-oak);
}

/* -------------------------------------------------------------------------- */
/* 2. DERS PROGRAMI MODALI (SCHEDULE TIMETABLE)                                */
/* -------------------------------------------------------------------------- */
.schedule-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.schedule-table th {
  background: #181c1f;
  color: var(--calm-gold);
  font-family: var(--font-serif);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid rgba(207, 161, 56, 0.3);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.schedule-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.schedule-table .time-col {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--calm-text-muted);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.15);
  font-weight: 600;
  vertical-align: middle;
  padding: 0.65rem 0.85rem;
}

.schedule-table .time-col .period-num {
  display: inline-block;
  color: var(--calm-gold);
  font-weight: 700;
  margin-right: 0.35rem;
}

.schedule-cell-inner {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.schedule-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.schedule-cell-class {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.schedule-badge-subj {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  color: var(--calm-gold);
}

.subj-tar {
  background: rgba(184, 93, 52, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(184, 93, 52, 0.4);
}

.subj-smedy {
  background: rgba(43, 62, 53, 0.4);
  color: #86efac;
  border: 1px solid rgba(74, 105, 90, 0.5);
}

.subj-sosbl {
  background: rgba(207, 161, 56, 0.25);
  color: #fde047;
  border: 1px solid rgba(207, 161, 56, 0.5);
}

.subj-tdu-t,
.subj-tdt {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.subj-reh {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.schedule-cell-topic {
  font-size: 0.76rem;
  color: var(--calm-cashmere);
}

.schedule-cell-room {
  font-size: 0.68rem;
  color: var(--calm-oak-light);
  font-family: var(--font-mono);
}

.is-highlight-class {
  background: rgba(234, 179, 8, 0.15) !important;
  border-left: 3px solid #eab308 !important;
  box-shadow: inset 0 0 12px rgba(234, 179, 8, 0.08);
}

.is-highlight-class .schedule-cell-class {
  color: #fef08a;
}

.is-office-hour {
  background: rgba(59, 130, 246, 0.15) !important;
  border-left: 3px solid #3b82f6 !important;
}

.is-day-col {
  background: rgba(255, 255, 255, 0.025);
}

.schedule-lunch-row td {
  padding: 0.75rem 1rem;
}

.schedule-lunch-cell {
  text-align: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
  color: var(--calm-gold);
  font-family: var(--font-serif);
  letter-spacing: 0.03em;
}

.schedule-empty-cell {
  text-align: center;
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

/* -------------------------------------------------------------------------- */
/* 3. DERS NOTLARI MODALI (LECTURE NOTES & FILTERS)                           */
/* -------------------------------------------------------------------------- */
.filter-tabs-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 1.25rem;
  position: relative;
}

.filter-tabs-container .filter-tabs-bar {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.2rem 0;
}

.filter-tabs-container .filter-tabs-bar::-webkit-scrollbar {
  display: none;
}

.filter-scroll-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--calm-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.filter-scroll-btn:hover {
  background: var(--calm-gold);
  color: #121417;
  transform: scale(1.08);
}

[data-theme="light-parchment"] .filter-scroll-btn {
  background: rgba(60, 50, 40, 0.08);
  border-color: rgba(60, 50, 40, 0.2);
  color: #8c571c;
}

[data-theme="light-parchment"] .filter-scroll-btn:hover {
  background: #8c571c;
  color: #ffffff;
}

.filter-tabs-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--calm-cashmere);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.filter-tab.active {
  background: var(--calm-oak);
  color: #231f1a;
  border-color: var(--calm-oak);
  font-weight: 700;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.note-card {
  background: #252b30;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.note-card:hover {
  transform: translateY(-3px);
  border-color: var(--calm-oak);
}

.note-card-grade-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(189, 155, 112, 0.2);
  color: var(--calm-oak-light);
  border: 1px solid rgba(189, 155, 112, 0.35);
}

.note-card-title {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.35;
}

.note-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.note-card-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.note-topic-tag {
  font-size: 0.7rem;
  color: var(--calm-text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.note-card-footer-meta {
  font-size: 0.75rem;
  color: var(--calm-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.note-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.note-card-actions .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
}

/* -------------------------------------------------------------------------- */
/* 4. YAZILAR & MAKALELER MODALI & READER                                     */
/* -------------------------------------------------------------------------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: #252b30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--calm-sienna);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.article-card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #191c1f;
}

.article-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-thumb {
  transform: scale(1.06);
}

.article-category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--calm-sienna);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: none;
}

.article-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--calm-text-muted);
}

.article-title {
  font-size: 1.1rem;
  color: #fff;
  font-family: var(--font-serif);
  line-height: 1.35;
}

.article-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article Reader View Inside Modal */
/* ────────────────────────────────────────────────────────────────
   4.1. SESLİ DİNLE (WEB SPEECH TTS) AUDIO PLAYER & OKUMA SÜRESİ
──────────────────────────────────────────────────────────────── */
.reader-tts-player {
  background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(15, 19, 24, 0.98) 100%);
  border: 1px solid rgba(207, 161, 56, 0.28);
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="light-parchment"] .reader-tts-player {
  background: linear-gradient(135deg, #f5efe6 0%, #ede3d3 100%);
  border-color: rgba(140, 87, 28, 0.25);
  box-shadow: 0 8px 24px rgba(60, 50, 40, 0.08);
}

.reader-tts-player.is-playing {
  border-color: rgba(207, 161, 56, 0.65);
  box-shadow: 0 12px 36px rgba(207, 161, 56, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tts-player-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tts-controls-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tts-btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #dfb448 0%, #c4992b 100%);
  color: #111317;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(207, 161, 56, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tts-btn-play:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(207, 161, 56, 0.5);
  filter: brightness(1.06);
}

.tts-btn-play:active {
  transform: translateY(0) scale(0.98);
}

.reader-tts-player.is-playing .tts-btn-play {
  background: linear-gradient(135deg, #e5983b 0%, #d17520 100%);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(229, 152, 59, 0.5);
}

.tts-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--calm-cashmere);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tts-btn-icon:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.08);
}

/* Sound Wave Equalizer */
.tts-soundwave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 4px;
}

.tts-wave-bar {
  width: 3px;
  height: 6px;
  background: var(--calm-gold);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.reader-tts-player.is-playing .tts-wave-bar {
  animation: ttsWave 1.2s ease-in-out infinite alternate;
}

.reader-tts-player.is-playing .tts-wave-bar:nth-child(1) { animation-delay: 0.1s; height: 14px; }
.reader-tts-player.is-playing .tts-wave-bar:nth-child(2) { animation-delay: 0.3s; height: 18px; }
.reader-tts-player.is-playing .tts-wave-bar:nth-child(3) { animation-delay: 0.2s; height: 10px; }
.reader-tts-player.is-playing .tts-wave-bar:nth-child(4) { animation-delay: 0.4s; height: 16px; }

@keyframes ttsWave {
  0% { height: 4px; opacity: 0.4; }
  50% { height: 18px; opacity: 1; }
  100% { height: 8px; opacity: 0.7; }
}

/* Track Info */
.tts-track-info {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tts-status-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light-parchment"] .tts-status-text {
  color: #2b2319;
}

.tts-progress-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--calm-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tts-badge-words {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(207, 161, 56, 0.12);
  border: 1px solid rgba(207, 161, 56, 0.3);
  color: var(--calm-gold);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
}

[data-theme="light-parchment"] .tts-badge-words {
  background: rgba(140, 87, 28, 0.1);
  border-color: rgba(140, 87, 28, 0.25);
  color: #8c571c;
}

/* Speed Selector Pills */
.tts-speed-selector {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tts-speed-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--calm-text-muted);
}

.tts-speed-pills {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

[data-theme="light-parchment"] .tts-speed-pills {
  background: rgba(60, 50, 40, 0.08);
  border-color: rgba(60, 50, 40, 0.15);
}

.tts-speed-pill {
  background: transparent;
  border: none;
  color: var(--calm-cashmere);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tts-speed-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light-parchment"] .tts-speed-pill:hover {
  color: #111;
  background: rgba(0, 0, 0, 0.06);
}

.tts-speed-pill.active {
  background: var(--calm-gold);
  color: #121417;
  font-weight: 700;
}

[data-theme="light-parchment"] .tts-speed-pill.active {
  background: #8c571c;
  color: #ffffff;
}

/* Progress Track */
.tts-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
}

[data-theme="light-parchment"] .tts-progress-track {
  background: rgba(60, 50, 40, 0.12);
}

.tts-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #dfb448 0%, #f39c12 100%);
  border-radius: 2px;
  transition: width 0.25s linear;
  box-shadow: 0 0 8px rgba(223, 180, 72, 0.6);
}

/* Okuma Süresi & Hızlı Dinle Butonu Kart İçi Stilleri */
.article-card-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(207, 161, 56, 0.12);
  border: 1px solid rgba(207, 161, 56, 0.35);
  color: var(--calm-gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.article-card-listen-btn:hover {
  background: var(--calm-gold);
  color: #121417;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(207, 161, 56, 0.3);
}

.article-read-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--calm-gold);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

[data-theme="light-parchment"] .article-read-badge-chip {
  background: rgba(140, 87, 28, 0.08);
  color: #8c571c;
}

/* Sesli Okuma Esnasında Paragraf Vurgulama */
.reader-content .tts-active-p {
  background: rgba(207, 161, 56, 0.12);
  border-left: 3px solid var(--calm-gold);
  padding-left: 0.85rem;
  border-radius: 0 6px 6px 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light-parchment"] .reader-content .tts-active-p {
  background: rgba(140, 87, 28, 0.09);
  border-left-color: #8c571c;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-content {
  font-family: var(--font-serif-body);
  font-size: 1.15rem;
  line-height: 1.85;
  color: #ede5da;
  max-width: 780px;
  margin: 0 auto;
}

.reader-content p {
  margin-bottom: 1.4rem;
}

.reader-content .article-lead {
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--calm-cashmere);
  font-weight: 500;
  margin-bottom: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.reader-content h3 {
  font-family: var(--font-serif);
  color: var(--calm-gold);
  font-size: 1.35rem;
  margin: 2.2rem 0 1rem 0;
  border-left: 3px solid var(--calm-gold);
  padding-left: 0.75rem;
  line-height: 1.4;
}

.reader-content .section-roman {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--calm-gold);
  margin: 2.2rem 0 0.8rem 0;
  letter-spacing: 0.05em;
  display: block;
}

.reader-content blockquote {
  border-left: 3px solid var(--calm-sienna-light);
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  background: rgba(197, 85, 54, 0.08);
  border-radius: 0 8px 8px 0;
  color: #f1ede7;
}

.reader-content .article-figure {
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

.reader-content .article-body-img {
  max-width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.reader-content figcaption {
  font-size: 0.85rem;
  color: var(--calm-gold);
  font-style: italic;
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reader-content .poem-block {
  background: rgba(0, 0, 0, 0.22);
  border-left: 3px solid var(--calm-gold);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  line-height: 1.85;
}

.reader-content .poem-title {
  font-size: 1.05rem;
  color: var(--calm-gold);
  margin-bottom: 0.9rem;
  font-style: normal;
  font-family: var(--font-serif);
}

.reader-content .article-divider {
  text-align: center;
  color: var(--calm-gold);
  font-size: 0.9rem;
  margin: 2rem 0;
  opacity: 0.55;
}

.reader-content ul, .reader-content ol {
  padding-left: 1.8rem;
  margin-bottom: 1.5rem;
}

.reader-content li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.reader-content .article-footnotes {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: var(--calm-text-muted);
  line-height: 1.65;
}

.reader-content .article-footnotes a {
  color: var(--calm-gold);
  text-decoration: underline;
  word-break: break-all;
}

/* Light theme overrides for article reader */
[data-theme="light"] .reader-content {
  color: #2c2825;
}

[data-theme="light"] .reader-content .article-lead {
  color: #5c341e;
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .reader-content h3 {
  color: #8e3d23;
  border-left-color: #8e3d23;
}

[data-theme="light"] .reader-content .section-roman {
  color: #8e3d23;
}

[data-theme="light"] .reader-content blockquote {
  background: rgba(164, 76, 44, 0.08);
  color: #3b2b20;
}

[data-theme="light"] .reader-content .article-figure {
  background: #f8f6f0;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .reader-content figcaption {
  color: #8e3d23;
}

[data-theme="light"] .reader-content .poem-block {
  background: #f5f2ea;
  border-left-color: #8e3d23;
  color: #2c2825;
}

[data-theme="light"] .reader-content .poem-title {
  color: #8e3d23;
}

[data-theme="light"] .reader-content .article-footnotes {
  border-top-color: rgba(0, 0, 0, 0.12);
  color: #665c54;
}

[data-theme="light"] .reader-content .article-footnotes a {
  color: #8e3d23;
}

/* -------------------------------------------------------------------------- */
/* 5. GÖRSEL HAFIZA & ARŞİV HUB MODALI (FOTOĞRAF, FİLATELİ, VİDEO)             */
/* -------------------------------------------------------------------------- */
.archive-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.archive-hub-card {
  background: #252b30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.archive-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--calm-gold);
}

.archive-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--calm-gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.archive-hub-icon {
  font-size: 2.2rem;
}

.archive-hub-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
}

.archive-hub-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.archive-hub-btn {
  margin-top: auto;
  align-self: flex-start;
  background: rgba(196, 160, 64, 0.15);
  color: var(--calm-gold);
  border: 1px solid var(--calm-gold);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/* 6. ÖZGEÇMİŞ & KİTAP ÖNERİLERİ MODALI                                       */
/* -------------------------------------------------------------------------- */
.about-sections-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .about-sections-wrap {
    grid-template-columns: 1fr;
  }
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -1.95rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--calm-gold);
  box-shadow: 0 0 8px var(--calm-gold);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--calm-gold);
}

.timeline-title {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--calm-text-muted);
}

/* -------------------------------------------------------------------------- */
/* 7. EVRENSEL ARAMA MODALI (Ctrl+K)                                          */
/* -------------------------------------------------------------------------- */
.search-modal-box {
  max-width: 680px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: #191c1f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  outline: none;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--calm-gold);
}

.search-result-type {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--calm-gold);
}

.search-result-title {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--calm-sienna);
  color: #fff;
}

.btn-primary:hover {
  background: var(--calm-sienna-light);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--calm-cashmere);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--calm-gold);
}

/* ==========================================================================
   LIGHT PARCHMENT THEME OVERRIDES FOR MODALS & COMPONENTS
   ========================================================================== */
[data-theme="light-parchment"] .calm-modal-backdrop {
  background: rgba(45, 38, 30, 0.65);
}

[data-theme="light-parchment"] .calm-modal-dialog {
  background: #f7f2ea;
  border-color: rgba(60, 50, 40, 0.12);
  color: #211c18;
}

[data-theme="light-parchment"] .calm-modal-header {
  background: #ede3d4;
  border-bottom-color: rgba(60, 50, 40, 0.1);
}

[data-theme="light-parchment"] .calm-modal-title {
  color: #211c18;
}

[data-theme="light-parchment"] .calm-modal-close {
  background: rgba(60, 50, 40, 0.06);
  border-color: rgba(60, 50, 40, 0.15);
  color: #3b3127;
}

[data-theme="light-parchment"] .calm-modal-close:hover {
  background: var(--calm-sienna);
  border-color: var(--calm-sienna);
  color: #ffffff;
}

[data-theme="light-parchment"] .schedule-table th {
  background: #e4d8c5;
  color: #704719;
  border-bottom-color: rgba(60, 50, 40, 0.12);
}

[data-theme="light-parchment"] .schedule-table td {
  border-bottom-color: rgba(60, 50, 40, 0.08);
  border-right-color: rgba(60, 50, 40, 0.06);
}

[data-theme="light-parchment"] .schedule-table .time-col {
  background: #e6dac8;
  color: #5c4e43;
}

[data-theme="light-parchment"] .schedule-table .time-col .period-num {
  color: #92581a;
}

[data-theme="light-parchment"] .schedule-table tr:hover td {
  background: rgba(184, 93, 52, 0.05);
}

[data-theme="light-parchment"] .schedule-cell-class {
  color: #1f1915;
}

[data-theme="light-parchment"] .schedule-cell-topic {
  color: #4a3e35;
}

[data-theme="light-parchment"] .schedule-cell-room {
  color: #70543c;
}

[data-theme="light-parchment"] .schedule-lunch-cell {
  background: rgba(60, 50, 40, 0.04);
  color: #8c571c;
}

[data-theme="light-parchment"] .is-highlight-class {
  background: rgba(234, 179, 8, 0.2) !important;
  border-left: 3px solid #b45309 !important;
}

[data-theme="light-parchment"] .is-highlight-class .schedule-cell-class {
  color: #854d0e;
}

[data-theme="light-parchment"] .is-day-col {
  background: rgba(60, 50, 40, 0.03);
}

[data-theme="light-parchment"] .schedule-empty-cell {
  color: #b0a496;
}

[data-theme="light-parchment"] .subj-tar {
  background: rgba(184, 93, 52, 0.15);
  color: #9c3f18;
  border-color: rgba(184, 93, 52, 0.35);
}

[data-theme="light-parchment"] .subj-smedy {
  background: rgba(43, 90, 60, 0.15);
  color: #1b6338;
  border-color: rgba(43, 90, 60, 0.35);
}

[data-theme="light-parchment"] .subj-sosbl {
  background: rgba(207, 161, 56, 0.2);
  color: #8c571c;
  border-color: rgba(207, 161, 56, 0.4);
}

[data-theme="light-parchment"] .subj-tdu-t,
[data-theme="light-parchment"] .subj-tdt {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
  border-color: rgba(147, 51, 234, 0.3);
}

[data-theme="light-parchment"] .subj-reh {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="light-parchment"] .schedule-cell-time {
  color: #7a501a;
  background: #ece0d0;
}

[data-theme="light-parchment"] .schedule-info-bar {
  background: #ede3d4;
  border-top-color: rgba(60, 50, 40, 0.1);
  color: #4a3e35;
}

[data-theme="light-parchment"] .note-card,
[data-theme="light-parchment"] .article-card,
[data-theme="light-parchment"] .archive-hub-card,
[data-theme="light-parchment"] .announcement-item,
[data-theme="light-parchment"] .bio-section,
[data-theme="light-parchment"] .search-result-item {
  background: #ede4d6;
  border-color: rgba(60, 50, 40, 0.1);
  color: #211c18;
}

[data-theme="light-parchment"] .note-card:hover,
[data-theme="light-parchment"] .article-card:hover,
[data-theme="light-parchment"] .archive-hub-card:hover,
[data-theme="light-parchment"] .announcement-item:hover,
[data-theme="light-parchment"] .search-result-item:hover {
  background: #e6dac8;
  border-color: var(--calm-sienna);
}

[data-theme="light-parchment"] .note-card-title,
[data-theme="light-parchment"] .article-title,
[data-theme="light-parchment"] .archive-hub-title,
[data-theme="light-parchment"] .announcement-item-title,
[data-theme="light-parchment"] .search-result-title {
  color: #1f1915;
}

[data-theme="light-parchment"] .note-card-desc,
[data-theme="light-parchment"] .article-excerpt,
[data-theme="light-parchment"] .archive-hub-desc,
[data-theme="light-parchment"] .announcement-item-desc {
  color: #4a3e35;
}

[data-theme="light-parchment"] .filter-pill,
[data-theme="light-parchment"] .btn-outline {
  background: rgba(60, 50, 40, 0.05);
  border-color: rgba(60, 50, 40, 0.15);
  color: #2d251e;
}

[data-theme="light-parchment"] .filter-pill:hover,
[data-theme="light-parchment"] .filter-pill.active,
[data-theme="light-parchment"] .btn-outline:hover {
  background: var(--calm-sienna);
  color: #ffffff;
  border-color: var(--calm-sienna);
}

[data-theme="light-parchment"] .search-input {
  background: #ede4d6;
  border-color: rgba(60, 50, 40, 0.18);
  color: #1f1915;
}

[data-theme="light-parchment"] .reader-content {
  color: #211c18;
}

[data-theme="light-parchment"] .note-card-footer-meta {
  border-top-color: rgba(60, 50, 40, 0.1);
  color: #5c4e43;
}

/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* PDF SUNU & DERS NOTU GÖRÜNTÜLEYİCİ MODAL                                    */
/* -------------------------------------------------------------------------- */
.pdf-viewer-dialog {
  max-width: 1160px;
  width: 95vw;
  height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  background: #1c2125;
}

.pdf-viewer-header {
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.pdf-viewer-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pdf-viewer-toolbar-actions .btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pdf-viewer-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #14171a;
  display: flex;
  flex-direction: column;
}

.pdf-viewer-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 20, 24, 0.9);
  z-index: 10;
  color: var(--calm-gold);
  font-size: 0.95rem;
  gap: 0.75rem;
  font-weight: 500;
}

.pdf-viewer-iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
  background: #ffffff;
}

/* Light Theme Overrides for PDF Viewer */
[data-theme="light-parchment"] .pdf-viewer-dialog {
  background: #f7f1e6;
  border-color: rgba(60, 50, 40, 0.15);
}

[data-theme="light-parchment"] .pdf-viewer-header {
  border-bottom-color: rgba(60, 50, 40, 0.1);
  background: #ede3d4;
}

[data-theme="light-parchment"] .pdf-viewer-spinner {
  background: rgba(247, 241, 230, 0.92);
  color: #8c571c;
}

/* Responsive Modal Adaptations */
@media (max-width: 768px) {
  .calm-modal {
    padding: 0.4rem;
  }

  .calm-modal-dialog {
    width: 98vw;
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: var(--radius-md);
  }

  .calm-modal-header {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .calm-modal-title-wrap {
    gap: 0.1rem;
  }

  .calm-modal-badge {
    font-size: 0.62rem;
  }

  .calm-modal-title {
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .calm-modal-close {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .calm-modal-body {
    padding: 0.75rem;
  }

  .filter-tabs-container {
    margin-bottom: 0.75rem;
    gap: 0.3rem;
  }

  .filter-scroll-btn {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }

  .filter-tab {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
  }

  .pdf-viewer-dialog {
    width: 98vw;
    height: 94vh;
    height: 94dvh;
    border-radius: var(--radius-sm);
  }

  .pdf-viewer-header {
    padding: 0.4rem 0.65rem;
    gap: 0.4rem;
  }

  .pdf-viewer-header .calm-modal-title {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
  }

  .pdf-viewer-toolbar-actions {
    gap: 0.3rem;
  }

  .pdf-viewer-toolbar-actions .btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }

  .pdf-viewer-toolbar-actions span {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* 10. KADEMELERE GÖRE KİTAP OKUMA LİSTESİ BİLEŞENLERİ                        */
/* -------------------------------------------------------------------------- */
.booklist-grade-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.booklist-grade-section:hover {
  border-color: rgba(207, 161, 56, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.booklist-grade-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.booklist-grade-badge {
  background: var(--calm-sienna);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: 0 2px 8px var(--calm-sienna-glow);
}

.booklist-grade-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.booklist-grade-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--calm-cream);
  letter-spacing: 0.02em;
}

.booklist-grade-theme {
  font-size: 0.8rem;
  color: var(--calm-oak-light);
  line-height: 1.35;
}

.booklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.book-card {
  background: rgba(14, 18, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.book-card:hover {
  transform: translateY(-3px);
  border-color: var(--calm-gold);
  background: rgba(14, 18, 22, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.book-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--calm-gold);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.book-card:hover::before {
  opacity: 1;
}

.book-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.book-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--calm-gold);
  background: rgba(207, 161, 56, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(207, 161, 56, 0.25);
}

.book-order {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--calm-text-muted);
}

.book-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.book-author {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--calm-oak-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.book-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--calm-cashmere);
  opacity: 0.9;
  margin-top: 0.2rem;
}

.booklist-guidance-note {
  margin-top: 1.25rem;
  padding: 0.85rem 1.1rem;
  background: rgba(207, 161, 56, 0.06);
  border: 1px dashed rgba(207, 161, 56, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--calm-cashmere);
  line-height: 1.5;
}

/* Light parchment theme overrides */
[data-theme="light-parchment"] .booklist-grade-section {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light-parchment"] .booklist-grade-section:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light-parchment"] .book-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light-parchment"] .book-card:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

[data-theme="light-parchment"] .book-title {
  color: #1a1510;
}

[data-theme="light-parchment"] .book-desc {
  color: #4a4036;
}

/* ==========================================================================
   FILM & SINEMA LISTESI (RECOMMENDED CULTURAL & ACADEMIC CINEMA)
   ========================================================================== */

.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.35rem;
  margin-top: 1rem;
}

.film-card {
  background: rgba(14, 18, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  position: relative;
}

.film-card:hover {
  transform: translateY(-4px);
  border-color: var(--calm-gold);
  background: rgba(18, 24, 30, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.film-card-header {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.1rem 0.6rem 1.1rem;
}

.film-poster-wrap {
  width: 95px;
  height: 138px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(145deg, #1f2730, #11171d);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.film-poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem;
  text-align: center;
  background: linear-gradient(145deg, #1c242c, #0e141a);
  color: var(--calm-gold);
  z-index: 1;
}

.film-poster-fallback i {
  font-size: 1.6rem;
  color: var(--calm-gold);
  opacity: 0.85;
}

.film-poster-fallback span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--calm-cashmere);
  opacity: 0.8;
  text-transform: uppercase;
}

.film-poster-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.film-card:hover .film-poster-img {
  transform: scale(1.05);
}

.film-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.film-imdb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  background: #f5c518;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  width: fit-content;
}

.film-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
}

.film-duration {
  font-size: 0.75rem;
  color: var(--calm-text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.film-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.film-tag {
  font-size: 0.65rem;
  color: var(--calm-gold);
  background: rgba(207, 161, 56, 0.1);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(207, 161, 56, 0.2);
}

.film-card-body {
  padding: 0.6rem 1.1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.film-summary {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--calm-cashmere);
  opacity: 0.92;
  margin: 0;
}

/* Light Theme overrides for Film List */
[data-theme="light-parchment"] .film-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light-parchment"] .film-card:hover {
  background: #ffffff;
  border-color: var(--calm-sienna);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light-parchment"] .film-poster-wrap {
  background: #eae3d9;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light-parchment"] .film-poster-fallback {
  background: linear-gradient(145deg, #e8dfd3, #d9cec0);
}

[data-theme="light-parchment"] .film-poster-fallback span {
  color: #5a4b3d;
}

[data-theme="light-parchment"] .film-title {
  color: #1a1510;
}

[data-theme="light-parchment"] .film-summary {
  color: #4a4036;
}

/* -------------------------------------------------------------------------- */
/* 12. TARİH KAVRAMLARI VE TERİMLER SÖZLÜĞÜ BİLEŞENLERİ                      */
/* -------------------------------------------------------------------------- */
.sozluk-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sozluk-search-input-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.sozluk-search-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--calm-gold);
  font-size: 1rem;
  pointer-events: none;
}

.sozluk-search-input {
  width: 100%;
  padding: 0.75rem 2.6rem 0.75rem 2.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.sozluk-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--calm-gold);
  box-shadow: 0 0 0 3px rgba(207, 161, 56, 0.18);
}

.sozluk-search-clear {
  position: absolute;
  right: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--calm-text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sozluk-search-clear:hover {
  background: var(--calm-sienna);
  color: #fff;
}

.sozluk-count-badge {
  background: rgba(207, 161, 56, 0.12);
  border: 1px solid rgba(207, 161, 56, 0.25);
  color: var(--calm-gold);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Alphabet Filter Bar */
.sozluk-alphabet-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
}

.sozluk-alphabet-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.15rem 0.5rem;
  width: 100%;
}

.sozluk-alphabet-bar::-webkit-scrollbar {
  display: none;
}

.sozluk-letter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--calm-text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0 0.35rem;
}

.sozluk-letter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sozluk-letter-btn.active {
  background: var(--calm-sienna);
  color: #ffffff;
  border-color: var(--calm-sienna);
  box-shadow: 0 2px 8px var(--calm-sienna-glow);
}

/* Dictionary Grid & Cards */
.sozluk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.sozluk-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all var(--transition-fast);
  position: relative;
}

.sozluk-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(207, 161, 56, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.sozluk-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.sozluk-card-term {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.sozluk-card-initial {
  background: rgba(207, 161, 56, 0.12);
  color: var(--calm-gold);
  border: 1px solid rgba(207, 161, 56, 0.25);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sozluk-card-meaning {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--calm-cashmere);
  opacity: 0.92;
  margin: 0;
}

.sozluk-highlight {
  background: rgba(207, 161, 56, 0.28);
  color: #fff;
  padding: 0.05rem 0.2rem;
  border-radius: 2px;
  font-weight: 600;
}

/* Light Theme Overrides for Sozluk */
[data-theme="light-parchment"] .sozluk-search-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a1510;
}

[data-theme="light-parchment"] .sozluk-search-input:focus {
  background: #ffffff;
  border-color: var(--calm-sienna);
  box-shadow: 0 0 0 3px rgba(184, 80, 66, 0.15);
}

[data-theme="light-parchment"] .sozluk-count-badge {
  background: rgba(184, 80, 66, 0.08);
  border-color: rgba(184, 80, 66, 0.2);
  color: var(--calm-sienna);
}

[data-theme="light-parchment"] .sozluk-alphabet-wrap {
  background: #f4ede3;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light-parchment"] .sozluk-letter-btn {
  color: #6b5d4f;
}

[data-theme="light-parchment"] .sozluk-letter-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1510;
}

[data-theme="light-parchment"] .sozluk-letter-btn.active {
  background: var(--calm-sienna);
  color: #ffffff;
}

[data-theme="light-parchment"] .sozluk-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light-parchment"] .sozluk-card:hover {
  background: #ffffff;
  border-color: var(--calm-sienna);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light-parchment"] .sozluk-card-term {
  color: #1a1510;
}

[data-theme="light-parchment"] .sozluk-card-meaning {
  color: #4a4036;
}

[data-theme="light-parchment"] .sozluk-card-initial {
  background: rgba(184, 80, 66, 0.08);
  color: var(--calm-sienna);
  border-color: rgba(184, 80, 66, 0.2);
}

[data-theme="light-parchment"] .sozluk-highlight {
  background: rgba(207, 161, 56, 0.4);
  color: #000;
}

@media (max-width: 768px) {
  .sozluk-search-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .sozluk-count-badge {
    justify-content: center;
  }

  .sozluk-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* 13. AKILLI TAHTA QR KOD İLE TELEFONA İNDİRME BİLEŞENLERİ                   */
/* -------------------------------------------------------------------------- */
.qr-modal-dialog {
  padding: 1.15rem 1.35rem 1.25rem 1.35rem;
  max-width: 420px;
}

.qr-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0 0 0;
}

.btn-gold {
  background: linear-gradient(135deg, #cfa138, #b8860b);
  color: #1a1510 !important;
  font-weight: 700;
  border: 1px solid rgba(207, 161, 56, 0.4);
  box-shadow: 0 2px 10px rgba(207, 161, 56, 0.25);
  transition: all var(--transition-fast);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e5b33e, #cfa138);
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(207, 161, 56, 0.4);
}

.qr-guidance-pill {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--calm-cashmere);
  background: rgba(207, 161, 56, 0.08);
  border: 1px dashed rgba(207, 161, 56, 0.25);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.qr-display-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.65rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  border: 3px solid var(--calm-gold);
}

.qr-canvas-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  padding: 0.15rem;
  border-radius: var(--radius-xs);
}

.qr-canvas-wrapper svg,
.qr-canvas-wrapper img {
  display: block;
  width: 195px;
  height: 195px;
  max-width: 100%;
}

.qr-target-badge {
  margin-top: 0.45rem;
  background: #f4ede3;
  color: #2b2219;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.qr-actions-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.15rem;
}

.qr-actions-row .btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
}

[data-theme="light-parchment"] .qr-display-box {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

[data-theme="light-parchment"] .qr-guidance-pill {
  background: rgba(184, 80, 66, 0.06);
  border-color: rgba(184, 80, 66, 0.25);
  color: #3d3226;
}


/* ========================================================================== */
/* PRINT-ONLY BANNERS (Hidden on screen, shown only when printing)            */
/* ========================================================================== */
.print-only-banner {
  display: none;
}

/* ========================================================================== */
/* @MEDIA PRINT — Makale Yazdırma Optimizasyonu                               */
/* ========================================================================== */
@media print {

  /* ── Tüm sayfayı gizle, sadece reader-modal'ı göster ── */
  body > *:not(#article-reader-modal) {
    display: none !important;
  }

  /* Modal'ı tam sayfa, scroll'suz göster */
  #article-reader-modal {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: auto !important;
  }

  #article-reader-modal .calm-modal-backdrop {
    display: none !important;
  }

  #article-reader-modal .calm-modal-dialog {
    position: static !important;
    max-width: 100% !important;
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* ── Butonları, TTS oynatıcısını ve kontrolleri gizle ── */
  .reader-header-actions,
  .calm-modal-close,
  #reader-print-btn,
  #font-increase-btn,
  #font-decrease-btn,
  .reader-tts-player,
  .tts-player-main,
  .tts-progress-track,
  .tts-soundwave {
    display: none !important;
  }

  /* ── Modal header — yazdırılacak başlık bilgisi ── */
  .calm-modal-header {
    background: #fff !important;
    border-bottom: 2px solid #222 !important;
    padding: 0.5cm 0 0.4cm !important;
    margin-bottom: 0.5cm !important;
  }

  .calm-modal-badge {
    color: #666 !important;
    font-size: 9pt !important;
  }

  .calm-modal-title {
    color: #111 !important;
    font-size: 16pt !important;
    font-weight: 700 !important;
  }

  /* ── Modal body — scroll kısıtlamasını kaldır ── */
  .calm-modal-body {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 !important;
  }

  /* ── Makale içerik alanı ── */
  .reader-content {
    color: #1a1a1a !important;
    font-size: 11pt !important;
    line-height: 1.7 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .reader-content p {
    color: #1a1a1a !important;
    margin-bottom: 0.5cm !important;
    orphans: 3;
    widows: 3;
  }

  .reader-content h2,
  .reader-content h3,
  .reader-content h4 {
    color: #000 !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  .reader-content img {
    max-width: 80% !important;
    height: auto !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .reader-content blockquote {
    border-left: 3px solid #888 !important;
    padding-left: 0.5cm !important;
    color: #444 !important;
    background: none !important;
  }

  .reader-content .tts-active-p {
    background: none !important;
    border-left: none !important;
    padding-left: 0 !important;
  }

  /* ── Print-only banners (header & footer) ── */
  .print-only-banner {
    display: flex !important;
  }

  .print-only-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0.3cm 0 0.3cm;
    border-bottom: 1.5px solid #ccc;
    margin-bottom: 0.3cm;
  }

  .print-brand-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .pbl-author {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 12pt;
    font-weight: 700;
    color: #222;
    letter-spacing: 0.05em;
  }

  .pbl-subtitle {
    font-size: 8pt;
    color: #888;
    letter-spacing: 0.03em;
  }

  .print-brand-right {
    text-align: right;
  }

  .pbr-url {
    font-family: 'Courier New', monospace;
    font-size: 10pt;
    font-weight: 700;
    color: #555;
    letter-spacing: 0.04em;
  }

  .print-only-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0.3cm 0 0;
    border-top: 1.5px solid #ccc;
    margin-top: 0.8cm;
    font-size: 8pt;
    color: #888;
  }

  .pob-left {
    flex: 1;
  }

  .pob-left strong,
  .pob-right strong {
    color: #555;
  }

  .pob-right {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 9pt;
  }

  /* ── Genel yazdırma ayarları ── */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    margin: 1.5cm 1.8cm;
    size: A4;
  }
}
