/* ===== SHARED PAGE STYLES ===== */

/* ===== PAGE BANNERS ===== */
.page-banner-wrap {
  width: 100%;
  overflow: hidden;
}
.page-banner-wrap:empty { display: none; }

.page-banner {
  display: block;
  width: 100%;
  position: relative;
  background: #111;
  overflow: hidden;
}
.page-banner a {
  display: block;
  width: 100%;
}
.page-banner img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.page-banner a:hover img {
  transform: scale(1.02);
}
.page-banner + .page-banner {
  margin-top: 8px;
}

/* Always show header bg on inner pages */
.header.scrolled {
  background: rgba(255,255,255,0.97) !important;
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

/* ===== PAGE HERO ===== */
.page-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1200 0%, #2a1e00 50%, #1a1200 100%);
}

.page-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(201,169,110,0.18) 0%, transparent 60%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 100px;
}

.page-breadcrumb {
  display: block;
  font-size: 13px;
  color: var(--white40);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.page-breadcrumb a {
  color: var(--gold);
  transition: opacity 0.2s;
}

.page-breadcrumb a:hover { opacity: 0.7; }

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--white70);
  max-width: 560px;
}

/* ===== PAGE MAIN ===== */
.page-main {
  padding: 80px 0 120px;
  min-height: 60vh;
  background: #ffffff;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  background: #f8f8f8;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 72px;
  z-index: 50;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-light);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  letter-spacing: 0.03em;
}

.filter-btn:hover {
  color: var(--text);
  border-color: #cccccc;
}

.filter-btn.active {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* ===== BIO PAGE ===== */
.bio-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  margin-bottom: 80px;
  align-items: start;
}

.bio-portrait-block {
  position: sticky;
  top: 96px;
}

@media (max-width: 768px) {
  .bio-section {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .bio-portrait-block {
    position: static;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  .bio-dates-card {
    display: flex;
    justify-content: center;
    gap: 0;
    text-align: center;
  }
  .bio-dates-card .bio-date-item { flex: 1; }
  .bio-date-divider {
    width: 1px;
    height: auto;
    margin: 0 16px;
    align-self: stretch;
  }
  .bio-main-text { text-align: left; }
}

.bio-portrait {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #e0e0e0;
  margin-bottom: 24px;
}

.bio-portrait img {
  width: 100%;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.4s;
}

.bio-portrait img:hover { filter: grayscale(0%); }

.bio-dates-card {
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bio-date-item { padding: 4px 0; }

.bio-date-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 4px;
}

.bio-date-val {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.bio-date-place {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.bio-date-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 16px 0;
}

.bio-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.bio-section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.bio-settings-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}
.bio-settings-toggle:hover,
.bio-settings-toggle.active {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}

.bio-settings-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: #faf8f4;
  border: 1px solid #ede7da;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.bio-set-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bio-set-label {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.bio-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #ddd;
  border-radius: 100px;
  overflow: hidden;
}

.bio-step-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #fff;
  color: var(--text-mid);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
}
.bio-step-btn:hover { background: var(--gold-dark); color: #fff; }

.bio-main-text p {
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 1.02rem;
}

/* ===== BIO PAGINATED TEXT ===== */
/* --bio-fs / --bio-lh — o'quvchi sozlagan shrift/satr oralig'i (JS orqali,
   #bioPageContent ga qo'yiladi va bolalarga meros bo'lib o'tadi). */
#bioPageContent p {
  font-size: var(--bio-fs, 1.12rem);
  line-height: var(--bio-lh, 1.9);
  color: var(--text-mid);
  margin-bottom: 20px;
}
#bioPageContent p:last-child { margin-bottom: 0; }

.bio-paginated {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#bioPageContent {
  color: var(--text-mid);
  /* Oddiy matnli bio <p> teglarisiz to'g'ridan-to'g'ri shu yerda chiqadi
     (faqat WYSIWYG/HTML bio ichki <p> qoidasidan foydalanadi) — shuning
     uchun betlash o'lchovi ham shu elementning shriftini o'qiydi. */
  line-height: var(--bio-lh, 1.85);
  font-size: var(--bio-fs, 1.02rem);
  min-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

#bioPageContent a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

#bioPageContent a:hover { opacity: 0.7; }

#bioPageContent.bio-slide-out-left {
  animation: bioSlideOutLeft 0.25s ease forwards;
}
#bioPageContent.bio-slide-out-right {
  animation: bioSlideOutRight 0.25s ease forwards;
}
#bioPageContent.bio-slide-in-right {
  animation: bioSlideInRight 0.35s ease forwards;
}
#bioPageContent.bio-slide-in-left {
  animation: bioSlideInLeft 0.35s ease forwards;
}

@keyframes bioSlideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}
@keyframes bioSlideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}
@keyframes bioSlideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes bioSlideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.bio-pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}

.bio-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: 1px solid var(--gold-dark);
  background: transparent;
  color: var(--gold-dark);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.bio-page-btn:hover:not(:disabled) {
  background: var(--gold-dark);
  color: #ffffff;
}

.bio-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.bio-page-btn-next {
  margin-left: auto;
}

.bio-page-indicator {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  min-width: 48px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ===== BIO TIMELINE ===== */
.bio-timeline-section { margin-bottom: 80px; }

.bio-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.btl-item {
  display: grid;
  grid-template-columns: 72px 32px 1fr;
  gap: 0;
  position: relative;
  min-height: 60px;
}

/* Vertikal chiziq — o'rta ustun ichida */
.btl-item::before {
  content: '';
  position: absolute;
  left: calc(72px + 16px);   /* yil + dot markazi */
  top: 18px;
  bottom: -48px;
  width: 1px;
  background: #e0e0e0;
  z-index: 0;
}

.btl-item:last-child::before { display: none; }

.btl-year {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-dark);
  text-align: right;
  padding-right: 16px;
  padding-top: 2px;
  white-space: nowrap;
}

.btl-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px var(--gold);
  margin-top: 4px;
  justify-self: center;
  flex-shrink: 0;
}

.btl-dot-last {
  background: var(--text-light);
  box-shadow: 0 0 0 2px var(--text-light);
}

.btl-body {
  padding-left: 16px;
  padding-bottom: 48px;
}

.btl-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
}

.btl-body p {
  color: var(--text-mid);
  line-height: 1.7;
  font-size: 0.92rem;
}

/* MOBIL */
@media (max-width: 640px) {
  .btl-item {
    grid-template-columns: 52px 24px 1fr;
  }

  .btl-item::before {
    left: calc(52px + 12px);
  }

  .btl-year {
    font-size: 11px;
    padding-right: 8px;
  }

  .btl-body {
    padding-left: 12px;
    padding-bottom: 32px;
  }

  .btl-body h3 { font-size: 1rem; }
}

/* ===== LEGACY GRID ===== */
.bio-legacy { margin-bottom: 40px; }

.legacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.legacy-card {
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition);
}

.legacy-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.legacy-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.legacy-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text);
}

.legacy-card p {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== QUOTES MORE BUTTON ===== */
.quotes-more-wrap {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 8px;
}

.quotes-more-btn {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--gold-dark);
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 100px;
  transition: all var(--transition);
}

.quotes-more-btn:hover {
  background: var(--gold-dark);
  color: #ffffff;
}

/* ===== NEWS PAGE ===== */
.news-page-grid {
  display: grid;
  gap: 48px;
}

.np-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 768px) {
  .np-featured { grid-template-columns: 1fr; }
}

.np-img-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--dark3), var(--dark4));
}

.np-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.np-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--dark3), var(--dark4));
}

.np-img-large { height: 100%; min-height: 320px; }

.np-cat {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gold);
  color: var(--black);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
}

.np-body { padding: 32px; }

.np-featured .np-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.np-date {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.np-body h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

.np-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text);
}

.np-body p {
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.np-read-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 28px;
  background: var(--gold);
  color: var(--black);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}

.np-read-btn:hover { opacity: 0.85; }

.np-link {
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
  transition: opacity var(--transition);
}

.np-link:hover { opacity: 0.7; }

.np-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.np-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.np-card:hover {
  border-color: #bbbbbb;
  transform: translateY(-4px);
}

.np-placeholder-2 { background: linear-gradient(135deg, #1a0a0a, #2a1515); }
.np-placeholder-3 { background: linear-gradient(135deg, #0a1a0a, #152515); }
.np-placeholder-4 { background: linear-gradient(135deg, #0a0a1a, #151525); }
.np-placeholder-5 { background: linear-gradient(135deg, #1a1a0a, #252510); }
.np-placeholder-6 { background: linear-gradient(135deg, #1a0a1a, #251525); }

/* ===== WORKS PAGE ===== */
.works-page-tabs {
  background: #f8f8f8;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 72px;
  z-index: 50;
}

.wpt-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.wpt-inner::-webkit-scrollbar { display: none; }

.wpt-link {
  display: block;
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition);
}

.wpt-link:hover { color: var(--text); }

.wpt-link.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.works-page-section {
  padding: 64px 0;
  border-bottom: 1px solid #e8e8e8;
}

.works-page-section:last-child { border-bottom: none; }

.wps-header { margin-bottom: 40px; }

.wps-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.wps-desc {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== MEDIA PAGE ===== */
.media-page-section {
  padding: 64px 0;
  border-bottom: 1px solid #e8e8e8;
}

.media-page-section:last-child { border-bottom: none; }

.media-section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.media-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.mp-item {
  display: flex;
  flex-direction: column;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.mp-item:hover {
  border-color: #bbbbbb;
  transform: translateY(-4px);
}

.mp-thumb {
  position: relative;
  height: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mp-thumb-video { background: linear-gradient(135deg, #0d0d0d, #1a1000); }
.mp-thumb-photo { background: linear-gradient(135deg, #0d0d14, #1a1520); }
.mp-photo-2 { background: linear-gradient(135deg, #140d0d, #201515); }
.mp-photo-3 { background: linear-gradient(135deg, #0d140d, #152015); }
.mp-photo-4 { background: linear-gradient(135deg, #0d1414, #152020); }
.mp-thumb-doc { background: linear-gradient(135deg, #14140d, #202015); }
.mp-doc-2 { background: linear-gradient(135deg, #140d14, #201520); }
.mp-doc-3 { background: linear-gradient(135deg, #0d0d0d, #1a1a1a); }
.mp-doc-4 { background: linear-gradient(135deg, #0d1214, #152018); }

.mp-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.mp-play-btn {
  width: 60px;
  height: 60px;
  background: rgba(201,169,110,0.9);
  color: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.mp-play-btn {
  padding-left: 4px;   /* uchburchakning optik markazi */
}

.mp-thumb-playable:hover .mp-play-btn {
  transform: scale(1.1);
  background: var(--gold);
}

/* Fayl/havola kiritilmagan video — tugma ko'rinadi, lekin o'chirilgan holatda */
.mp-play-off {
  opacity: 0.35;
  cursor: default;
}
.mp-thumb-playable:hover .mp-play-off,
.mp-play-off:hover {
  transform: none;
  background: rgba(201,169,110,0.9);
}

.mp-duration {
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Galereyadagi rasmlar soni (bitta yozuvda bir nechta fotosurat bo'lsa) */
.mp-count {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.72);
  color: var(--white, #fff);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 12px;
  letter-spacing: 0.03em;
}

.mp-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: var(--white70);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.mp-item:hover .mp-zoom { opacity: 1; }

.mp-caption {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mp-caption h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-caption p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-type-badge { margin-top: auto; }

.mp-type-badge {
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ===== AUDIO LIST ===== */
.audio-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audio-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}

.audio-item:hover { border-color: #bbbbbb; }

.audio-play-btn {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--gold-dark);
  transition: background var(--transition);
}

.audio-play-btn:hover { background: var(--gold); color: var(--black); }

/* Kartochka o'ng qismi: sarlavha/tavsif ustida, pleyer boshqaruvlari ostida */
.audio-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-info h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.audio-info p {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* Tashqi havola / o'ynatib bo'lmaydigan yozuv uchun oddiy davomiylik yorlig'i */
.audio-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-duration {
  font-size: 13px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.audio-play-btn.audio-play-off { opacity: 0.4; cursor: default; }
a.audio-play-btn { text-decoration: none; }

/* ── Haqiqiy pleyer boshqaruvlari: vaqt / progress / ovoz ──────────────── */
.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.audio-time {
  font-size: 12px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 34px;
}

.audio-time[data-cur] { text-align: right; }

.audio-progress {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.audio-progress-track {
  position: relative;
  height: 4px;
  background: #e2e2e2;
  border-radius: 2px;
}

.audio-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
}

.audio-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}

.audio-progress:hover .audio-progress-thumb,
.audio-progress:focus-visible .audio-progress-thumb { transform: translate(-50%, -50%) scale(1.2); }

.audio-vol-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-light);
  font-size: 1.05rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.audio-vol-btn:hover { background: #eee; color: var(--text); }
.audio-vol-btn.is-muted { color: var(--gold-dark); }

/* Audio manba elementi — ko'rinmas, faqat JS orqali boshqariladi */
.audio-player { display: none; }

@media (max-width: 560px) {
  .audio-item { flex-wrap: wrap; }
  .audio-controls { order: 3; }
  .audio-time { min-width: 30px; }
}

/* ===== MEDIA: banner rasmi / kadri ===== */

/* Rasm yoki video kadri thumbnail'ni to'liq qoplaydi — qora joy qolmaydi */
.mp-thumb-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0d0d0d;
  border: 0;
}

.mp-thumb .mp-play-btn,
.mp-thumb .mp-icon,
.mp-thumb .mp-zoom,
.mp-thumb .mp-duration { position: relative; z-index: 2; }

.mp-thumb .mp-zoom,
.mp-thumb .mp-duration { position: absolute; }

/* Kadr ustidagi matn/tugma o'qilishi uchun yengil qorayish */
.mp-thumb-playable::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.45));
  pointer-events: none;
}

.mp-thumb[data-play-kind] { cursor: pointer; }
.mp-thumb[data-play-kind]:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.mp-duration:empty { display: none; }

/* ===== MEDIA LIGHTBOX ===== */

body.ml-lock { overflow: hidden; }

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.media-lightbox.open { display: flex; }

.ml-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}

.ml-dialog {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ml-stage {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.ml-stage:has(img) { aspect-ratio: auto; background: transparent; }

.ml-stage video,
.ml-stage iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.ml-stage img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

/* ── Audio modal (bosh sahifadagi "tanlangan audio" kartochkasi) ── */
.ml-stage:has(.ml-audio) { aspect-ratio: auto; }

.ml-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 36px 24px;
  background: linear-gradient(135deg, #1a1a1a, #262019);
}

.ml-audio-icon {
  font-size: 44px;
  line-height: 1;
  opacity: 0.85;
}

/* Modal ichidagi pleyer — media sahifasidagi .audio-item bilan bir xil,
   faqat eni cheklanadi (dialog to'liq enini egallab ketmasin). */
.ml-audio .audio-item {
  width: min(620px, 100%);
  background: #ffffff;
}

/* ── Ijro etib bo'lmagan fayl uchun xabar ── */
.ml-stage:has(.ml-error) { aspect-ratio: auto; }

.ml-error {
  padding: 40px 24px;
  text-align: center;
  color: #e8e8e8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.ml-error a {
  color: var(--gold, #c9a96e);
  text-decoration: underline;
}

.ml-caption {
  color: var(--white70, #cfcfcf);
  font-size: 0.9rem;
  text-align: center;
  min-height: 1em;
}

.ml-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.ml-close:hover { background: rgba(255,255,255,0.25); }

/* ── Galereya navigatsiyasi (faqat bir nechta fotosurat ochilganda) ── */
.ml-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
}
.ml-nav:hover { background: rgba(255,255,255,0.25); }
.ml-prev { left: -56px; }
.ml-next { right: -56px; }
.media-lightbox.ml-has-gallery .ml-nav { display: flex; }

/* ── Foto albom: hisoblagich + pastdagi eskizlar tasmasi ──
   Faqat galereya rejimida (bir nechta rasm) ko'rinadi. */
.ml-counter,
.ml-thumbs { display: none; }

.media-lightbox.ml-has-gallery .ml-counter {
  display: block;
  align-self: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: var(--white70, #cfcfcf);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.media-lightbox.ml-has-gallery .ml-thumbs {
  display: flex;
  gap: 8px;
  /* Kam rasm bo'lsa — markazda. Ko'payib toshib ketsa — ekran bo'ylab to'ladi
     va suriladi. `safe` aynan shu uchun: toshganda markazlashni tashlab,
     boshidan boshlaydi (aks holda birinchi eskiz chap tomonda kesilib qolardi).
     Qo'llab-quvvatlamaydigan brauzer 2-qatorni e'tiborsiz qoldirib, oddiy
     `center` bilan ishlayveradi. */
  justify-content: center;
  justify-content: safe center;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.media-lightbox.ml-has-gallery .ml-thumbs::-webkit-scrollbar { height: 6px; }
.media-lightbox.ml-has-gallery .ml-thumbs::-webkit-scrollbar-track { background: transparent; }
.media-lightbox.ml-has-gallery .ml-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
}

.ml-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}
.ml-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.ml-thumb.is-active {
  opacity: 1;
  border-color: var(--gold, #c9a96e);
}
.ml-thumb:focus-visible { outline: 2px solid var(--gold, #c9a96e); outline-offset: 2px; }

@media (max-width: 640px) {
  .ml-thumb { width: 62px; height: 44px; }
  .media-lightbox.ml-has-gallery .ml-thumbs { gap: 6px; }
}

@media (max-width: 900px) {
  .ml-prev { left: 4px; }
  .ml-next { right: 4px; }
}

/* ===== PDF MODAL (pdf-reader.js qayta ishlatilishi — qo'lyozma PDF) ===== */
.media-lightbox.ml-pdf-mode .ml-stage {
  aspect-ratio: auto;
  background: var(--rd-bg, #f2ede3);
  max-height: 82vh;
  overflow: hidden;
}
.ml-pdf-wrap { position: relative; height: 82vh; max-height: 82vh; display: flex; flex-direction: column; }
.ml-pdf-wrap .pv-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ml-pdf-wrap .pv-canvas-wrap { flex: 1; min-height: 0; }
.ml-pdf-wrap .pv-loading,
.ml-pdf-wrap .pv-fallback { min-height: 240px; }

/* pdf-reader.css dagi --a4-view-h to'liq sahifa uchun (100vh - 300px)
   mo'ljallangan — modalda bu chrome mavjud emas, shuning uchun qayta
   belgilanadi. pdf-reader.css ning o'ziga tegilmaydi. */
.media-lightbox.ml-pdf-mode {
  --a4-view-h: calc(82vh - 90px);
}

/* Toolbar/sozlamalar paneli fixed pozitsiyada (reader.css) — lightbox'ning
   9000 z-index'idan yuqori bo'lishi uchun oshiramiz. */
.ml-pdf-toolbar { z-index: 9010; }
#rdSettings { z-index: 9011; }

@media (max-width: 640px) {
  .media-lightbox { padding: 16px; }
  .ml-close { top: -40px; }
  .audio-player { height: 32px; }
  .ml-pdf-wrap, .media-lightbox.ml-pdf-mode .ml-stage { height: 78vh; max-height: 78vh; }
}

/* ===== TADQIQOTLAR PAGE ===== */
.research-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.research-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.research-search {
  width: 100%;
  padding: 13px 48px 13px 20px;
  border: 1.5px solid #e0e0e0;
  border-radius: 100px;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fff;
}

.research-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

.research-search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
  pointer-events: none;
}

.research-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-filter-btn {
  padding: 7px 20px;
  border: 1.5px solid #e0e0e0;
  background: transparent;
  border-radius: 100px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.research-filter-btn:hover { border-color: var(--gold); color: var(--text); background: rgba(201,169,110,0.06); }
.research-filter-btn.active { background: var(--gold); border-color: var(--gold); color: var(--black); font-weight: 600; }

.research-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 24px;
  padding: 10px 16px;
  background: #fafaf8;
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.research-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--text-light);
  font-size: 15px;
}

/* Section header bar — filtr tagida, ro'yxat ustida */
.research-section-header-bar {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: #fdf6e8;
  border: 1px solid #f0e0b0;
  border-left: 4px solid var(--gold);
  padding: 12px 20px;
  border-radius: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.rsh-sep {
  opacity: 0.4;
  margin: 0 6px;
  font-style: normal;
}

/* Section sarlavhalari (ro'yxat ichida — subsection uchun) */
.research-section-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 48px 0 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1a1200 0%, #2a1e00 100%);
  color: var(--gold);
  border-radius: 8px;
}

.research-section-title:first-child { margin-top: 0; }

.research-subsection-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 28px 0 4px;
  padding: 0 4px 8px;
  border-bottom: 1px solid #f0ebe0;
}

/* Tadqiqot kartasi */
.research-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Section/subsection sarlavhalari to'liq kenglikda */
.research-list .research-section-title,
.research-list .research-subsection-title {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .research-list { grid-template-columns: 1fr; }
}

.research-item {
  background: #fff;
  border: 1px solid #e8e4d8;
  border-radius: 12px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.research-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.research-item:hover {
  border-color: #c9a96e;
  box-shadow: 0 4px 20px rgba(201,169,110,0.12);
  transform: translateY(-2px);
}

.research-item:hover::after {
  transform: scaleX(1);
}

.research-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.research-year-badge {
  font-size: 12px;
  color: var(--gold-dark);
  font-weight: 700;
  white-space: nowrap;
  background: #fdf6e8;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #f0e0b0;
}

.research-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.5;
  font-weight: 600;
}

.research-author {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
}

.research-read-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-top: 4px;
  transition: color 0.2s;
}

.research-read-link:hover {
  color: #7a5a1a;
}

/* Pagination */
.research-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.research-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid #e0e0e0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.research-page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-dark); background: rgba(201,169,110,0.06); }
.research-page-btn.active { background: var(--gold); border-color: var(--gold); color: var(--black); font-weight: 700; }
.research-page-btn:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 640px) {
  .research-item { padding: 18px 20px; }
  .research-section-title { font-size: 0.95rem; padding: 11px 16px; }
}

.research-title-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.research-title-link:hover {
  color: var(--gold-dark);
}

/* Media type badges on research list items */
.ri-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.7;
  cursor: default;
  user-select: none;
}
.ri-badge-video { background: #fff0f0; color: #c0392b; }
.ri-badge-img   { background: #f0f8ff; color: #2980b9; }
.ri-badge-audio { background: #f0fff4; color: #27ae60; }
.ri-badge-doc   { background: #fdf6e8; color: #a07030; }

/* ===== TADQIQOTLAR PAGE ===== */
.research-page-main {
  background: #f8f7f4;
  padding: 0 0 80px;
}

/* --- SEARCH HERO --- */
.research-search-hero {
  background: linear-gradient(135deg, #1a1200 0%, #2a1e00 100%);
  padding: 56px 24px 52px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.research-search-wrap-big {
  position: relative;
  width: 100%;
  max-width: 680px;
}

.research-search-big {
  width: 100%;
  padding: 18px 56px 18px 28px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-family: var(--font-sans);
  outline: none;
  background: #fff;
  box-shadow: 0 4px 32px rgba(0,0,0,0.25);
  transition: box-shadow 0.25s;
  box-sizing: border-box;
  color: var(--text);
}

.research-search-big:focus {
  box-shadow: 0 4px 40px rgba(201,169,110,0.35), 0 0 0 3px rgba(201,169,110,0.2);
}

.research-search-big::placeholder {
  color: #aaa;
}

.research-search-icon-big {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #bbb;
  pointer-events: none;
}

/* --- FILTRLAR BAR --- */
.research-filters-bar {
  padding: 24px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.research-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

/* --- O'NG DROPDOWN TUGMA --- */
.research-filter-dropdown-wrap {
  position: relative;
  flex-shrink: 0;
}

.research-filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 100px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.research-filter-dropdown-btn:hover {
  border-color: var(--gold);
  background: #fffdf6;
}

.rfd-arrow {
  font-size: 10px;
  color: var(--text-light);
  transition: transform 0.2s;
}

.research-filter-dropdown-menu.open ~ .research-filter-dropdown-btn .rfd-arrow,
.research-filter-dropdown-menu.open + * .rfd-arrow {
  transform: rotate(180deg);
}

.research-filter-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 100;
  padding: 8px;
  flex-direction: column;
  gap: 2px;
  max-height: 360px;
  overflow-y: auto;
}

.research-filter-dropdown-menu.open {
  display: flex;
}

.rfd-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  padding: 10px 12px 4px;
  opacity: 0.8;
}

.rfd-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.rfd-item:hover {
  background: #fdf6e8;
  color: var(--gold-dark);
}

.rfd-item.active {
  background: var(--gold);
  color: var(--black);
  font-weight: 600;
}

/* ===== TADQIQOT DETAIL PAGE ===== */
.research-detail { max-width: 820px; margin: 0 auto; }

.research-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 36px;
  padding: 8px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 100px;
  transition: all 0.2s;
}
.research-back:hover {
  color: var(--gold-dark);
  border-color: var(--gold);
  background: rgba(201,169,110,0.06);
}

.research-detail-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 2px solid #f0f0f0;
}

.research-detail-section {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-bottom: 14px;
  background: #fdf6e8;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #f0e0b0;
  font-weight: 600;
}

.research-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 20px;
}

.research-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  font-size: 13.5px;
  color: var(--text-light);
  padding: 16px 20px;
  background: #fafaf8;
  border-radius: 10px;
  border: 1px solid #f0ebe0;
}

.research-detail-meta span { display: flex; align-items: center; gap: 6px; }
.research-detail-meta span strong { color: var(--text); font-weight: 600; }

.research-detail-body {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-mid);
  margin-top: 32px;
}
.research-detail-body p { margin-bottom: 1.3em; }
.research-detail-body strong { color: var(--text); font-weight: 600; }
.research-detail-body em { font-style: italic; }
.research-detail-body a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }

.research-detail-media {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.research-detail-youtube {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.research-detail-youtube iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.research-detail-image img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.research-detail-audio {
  padding: 20px;
  background: #fafaf8;
  border: 1px solid #f0ebe0;
  border-radius: 10px;
}
.research-detail-audio audio { width: 100%; }

.research-detail-doc a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1.5px solid var(--gold-dark);
  color: var(--gold-dark);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.research-detail-doc a:hover { background: var(--gold-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .page-hero { min-height: 0; padding-bottom: 36px; }
  .page-hero-content { padding-top: 72px; }
  .page-main { padding: 40px 0 80px; }
  .research-page-main { padding: 0 0 60px; }
  .audio-item { padding: 16px; gap: 12px; }
  .np-body, .np-featured .np-body { padding: 20px; }
  .legacy-grid { grid-template-columns: 1fr 1fr; }
  .media-page-grid { grid-template-columns: 1fr; }
  .authors-grid-home { grid-template-columns: 1fr 1fr; }
  .authors-grid      { grid-template-columns: 1fr 1fr; }
  .author-card-bio-short { -webkit-line-clamp: 4; }
}

/* ===== SAYT MUALLIFLARI — LANDING SECTION ===== */
.authors-section {
  background: #fff;
  padding: 100px 0 90px;
  border-top: 1px solid #ede9df;
}

.authors-section-head {
  margin-bottom: 60px;
}

.authors-section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.authors-section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.15;
}

.authors-section-sub {
  font-size: 1rem;
  color: var(--gray);
  max-width: 420px;
}

.authors-section-more {
  margin-top: 52px;
}

.btn-authors-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--ink);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-authors-more:hover {
  background: #2a1e00;
  transform: translateY(-1px);
}

/* ===== AUTHORS GRID ===== */
.authors-grid-home,
.authors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ===== AUTHOR CARD ===== */
.author-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(0,0,0,0.28);
}

/* rasm — to'liq background */
.author-card-photo-wrap {
  position: absolute;
  inset: 0;
}

.author-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0;
  border: none;
  transition: transform 0.4s ease;
}

.author-card:hover .author-card-photo { transform: scale(1.04); }

/* placeholder — rasm yo'q bo'lsa gradient fon */
.author-card-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a1200 0%, #3d2c00 50%, #1a1200 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  border-radius: 0;
  border: none;
  margin: 0;
}

/* gradient overlay pastda */
.author-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(0,0,0,0.15) 55%,
    rgba(0,0,0,0.75) 80%,
    rgba(0,0,0,0.92) 100%
  );
  border-radius: 16px;
  pointer-events: none;
}

/* matn qismi — pastda overlay ustida */
.author-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-card-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.author-card-role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* bio — hover da ko'rinadi */
.author-card-bio {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
  margin-top: 6px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
}

.author-card:hover .author-card-bio {
  max-height: 120px;
  opacity: 1;
}

.author-card-bio-short { /* landing da ham bir xil */ }

.author-card-email {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin-top: 4px;
  display: none; /* hover bio ichida yetarli */
}

.author-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.author-card:hover .author-card-more { opacity: 1; }

/* authors.html page */
.authors-page-main {
  background: #f8f7f4;
  padding: 60px 0 100px;
}

/* ===== AUTHOR PROFILE (authors.html) ===== */
.authors-profiles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.author-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 520px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.06);
}

.author-profile--reverse {
  direction: rtl;
}
.author-profile--reverse > * {
  direction: ltr;
}

.author-profile-img-wrap {
  position: relative;
  overflow: hidden;
}

.author-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
}

.author-profile:hover .author-profile-img { transform: scale(1.03); }

.author-profile-img-deco {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.author-profile-info {
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.author-profile-index {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(201,169,110,0.18);
  font-family: var(--font-serif);
  line-height: 1;
  margin-bottom: 16px;
}

.author-profile-role {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.author-profile-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0;
}

.author-profile-divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 20px 0 24px;
}

.author-profile-bio {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 28px;
}

.author-profile-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gold-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(160,112,48,0.3);
  padding-bottom: 2px;
  width: fit-content;
  transition: color 0.2s, border-color 0.2s;
}

.author-profile-email:hover {
  color: var(--gold);
  border-color: var(--gold);
}

@media (max-width: 900px) {
  .author-profile {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .author-profile--reverse { direction: ltr; }
  .author-profile-img-wrap { height: 320px; }
  .author-profile-info { padding: 40px 32px; }
}

@media (max-width: 640px) {
  .author-profile-img-wrap { height: 260px; }
  .author-profile-info { padding: 28px 24px 32px; }
  .author-profile-index { font-size: 2.5rem; }
}

@media (max-width: 1024px) {
  .authors-grid-home,
  .authors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .authors-section { padding: 60px 0 60px; }
  .authors-page-main { padding: 0 0 60px; }
  .authors-grid-home,
  .authors-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ===== ASAR MODAL ===== */
.work-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(15,10,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.work-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.work-modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  transform: translateY(24px);
  transition: transform 0.3s ease;
}
.work-modal-overlay.open .work-modal-box {
  transform: translateY(0);
}
.work-modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.08);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.2s;
  z-index: 1;
}
.work-modal-close:hover { background: rgba(0,0,0,0.15); }
.work-modal-inner {
  padding: 32px 40px 40px;
}
.wm-header {
  border-bottom: 1px solid #f0e8d8;
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.wm-year {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold, #c9a96e);
  background: rgba(201,169,110,0.1);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.wm-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1200;
  line-height: 1.3;
  margin: 0 0 12px;
}
.wm-desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}
.wm-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2a2a;
  white-space: pre-wrap;
}
.wm-no-content {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 32px 0;
}

/* Tugma — article-row ichida */
.art-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--gold, #c9a96e);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s;
  text-decoration: none;
}
.art-link-btn:hover { color: #8a6a30; }
.art-link-empty { display: inline-block; width: 80px; }

/* Tugma — book-card ichida */
.book-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold, #c9a96e);
  transition: color 0.2s;
}
.book-link-btn:hover { color: #8a6a30; }

/* ===== PUBLITSISTIKA SUBSECTION SARLAVHA ===== */
.pub-subsection-header {
  padding: 24px 0 8px;
  margin-top: 8px;
}
.pub-subsection-header h3 {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1200;
  border-left: 3px solid var(--gold, #c9a96e);
  padding-left: 14px;
  margin: 0;
}
.pub-subsection-header + .article-row {
  border-top: none;
}

@media (max-width: 640px) {
  .work-modal-inner { padding: 24px 20px 28px; }
  .wm-title { font-size: 1.35rem; }
}

/* ===== AUTHORS PAGE ===== */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
  padding: 48px 0;
}

.author-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.author-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.author-card-photo-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1200, #2a1e00);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-card-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(201,169,110,0.2);
  border: 2px solid rgba(201,169,110,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--gold);
}
.author-card-info {
  padding: 20px;
}
.author-card-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.author-card-years {
  font-size: 12px;
  color: var(--gold-dark);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}
.author-card-specialty {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}
.authors-empty { padding: 48px 0; color: var(--text-light); text-align: center; }

/* ===== AUTHOR DETAIL PAGE ===== */
.author-detail-hero .page-hero-content { padding-bottom: 48px; }

.author-hero-inner {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  margin-top: 24px;
}
.author-hero-photo {
  flex-shrink: 0;
  width: 140px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(201,169,110,0.15);
  border: 2px solid rgba(201,169,110,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-photo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(201,169,110,0.2);
}
.author-hero-info { flex: 1; min-width: 0; }
.author-hero-years {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin: 8px 0 4px;
}
.author-hero-specialty {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

.author-detail-main { padding-top: 0; }

.author-bio-section {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 24px;
}
.author-bio-text { max-width: 720px; }
.author-bio-para {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  margin: 0 0 1.2em;
}
.author-bio-empty { color: var(--text-light); font-style: italic; }

.author-works-section { padding: 40px 0 64px; }

.author-works-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.author-tab-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.author-tab-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.author-tab-btn.active {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
}
.author-no-works { color: var(--text-light); padding: 24px 0; }

/* ===== READING PAGE ===== */
.reading-hero .page-title { font-size: clamp(1.6rem, 4vw, 2.8rem); }
.reading-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.reading-meta-year {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gold);
}
.reading-meta-cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
  padding: 3px 10px;
  border-radius: 20px;
}
.reading-meta-sep {
  color: rgba(255,255,255,0.3);
  font-size: 1.1rem;
}

.reading-main {
  padding: 0;
  background: #faf8f4;
  transition: background 0.3s;
}
.reading-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Reading progress bar (tepada) */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.reading-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transition: width 0.1s linear;
}

/* Reading toolbar */
.reading-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 40px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  position: sticky;
  top: 12px;
  z-index: 50;
}
.reading-tool-group { display: flex; align-items: center; gap: 6px; }
.reading-tool-label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-right: 4px;
}
.reading-tool-btn {
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 9px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.reading-tool-btn:hover { border-color: var(--gold); color: var(--gold-dark); background: rgba(201,169,110,0.06); }
.reading-tool-toggle.active { background: #f2e6cf; border-color: var(--gold); color: var(--gold-dark); }

.reading-content {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.95;
  color: #2a2620;
  transition: font-size 0.15s ease;
}
.reading-content a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.reading-content a:hover { color: var(--gold); }
.reading-content blockquote {
  margin: 1.6em 0;
  padding: 0.4em 0 0.4em 1.4em;
  border-left: 3px solid var(--gold);
  color: #4a4438;
  font-style: italic;
}
.reading-content h1, .reading-content h2, .reading-content h3 {
  font-family: var(--serif);
  color: #1f1b15;
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}
.reading-content ul, .reading-content ol { margin: 1.2em 0; padding-left: 1.4em; }
.reading-content li { margin-bottom: 0.5em; }

/* Birinchi paragrafda drop-cap effekti */
.reading-paragraph:first-of-type::first-letter {
  font-size: 3.2em;
  line-height: 0.82;
  float: left;
  margin: 0.05em 0.12em 0 0;
  font-weight: 700;
  color: var(--gold-dark);
}

/* She'riyat */
.poetry-stanza {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2em;
}
.poetry-line {
  display: block;
  line-height: 1.7;
}

/* Nasr */
.reading-paragraph {
  margin: 0 0 1.5em;
  text-align: justify;
  hyphens: auto;
}
.reading-empty { color: var(--text-light); font-style: italic; }

/* Sepia (ko'z uchun yumshoq) rejim */
.reading-main.reading-sepia { background: #f4ecd8; }
.reading-main.reading-sepia .reading-content { color: #433422; }
.reading-main.reading-sepia .reading-toolbar { background: #faf3e2; }

/* Sahifalash (pagination) */
.reading-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 48px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.reading-pager-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.reading-pager-btn:hover:not(:disabled) { border-color: var(--gold); background: rgba(201,169,110,0.08); }
.reading-pager-btn:disabled { opacity: 0.35; cursor: default; }
.reading-pager-info {
  font-size: 14px;
  color: var(--text-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.reading-pager-info span:not([data-i18n]) { color: var(--text); font-weight: 600; }

/* Navigatsiya */
.reading-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.reading-nav-btn {
  text-decoration: none;
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.reading-nav-btn:hover { color: var(--gold); }
.reading-nav-back {
  text-decoration: none;
  font-size: 13px;
  color: var(--text-light);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.2s;
}
.reading-nav-back:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ===== MANBALAR PAGE ===== */
.sources-auth-banner {
  background: linear-gradient(90deg, #1a1200 0%, #2a1e00 100%);
  border-bottom: 1px solid rgba(201,169,110,0.2);
  padding: 16px 0;
}
.sources-user-banner {
  background: rgba(201,169,110,0.07);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.sources-auth-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sources-auth-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}
.sources-auth-text strong { font-size: 15px; color: #fff; }
.sources-auth-btns { display: flex; gap: 10px; }
.sources-user-greeting { font-size: 14px; color: var(--text); font-weight: 500; }

.btn-auth {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-login {
  background: transparent;
  border: 1.5px solid rgba(201,169,110,0.6);
  color: var(--gold-light);
}
.btn-login:hover { border-color: var(--gold); color: var(--gold); }
.btn-register {
  background: var(--gold-dark);
  color: #fff;
}
.btn-register:hover { background: var(--gold); }
.btn-logout {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  font-size: 13px;
  padding: 6px 16px;
}
.btn-logout:hover { border-color: #c00; color: #c00; }

.sources-main { padding-top: 0; }
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 48px 0;
}
.sources-empty { padding: 48px 0; color: var(--text-light); text-align: center; }

.source-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.source-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.source-card-premium { border-color: rgba(201,169,110,0.4); }
.source-card-inner { padding: 24px; }
.source-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.source-card-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  flex: 1;
}
.source-lock-badge {
  font-size: 11px;
  background: rgba(201,169,110,0.12);
  color: var(--gold-dark);
  border: 1px solid rgba(201,169,110,0.3);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.source-card-year {
  display: block;
  font-size: 12px;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.source-preview {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-light);
  margin: 0 0 16px;
}
.source-card-actions { margin-top: 8px; }
.source-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.source-btn-read { background: var(--gold-dark); color: #fff; }
.source-btn-read:hover { background: var(--gold); }
.source-btn-locked {
  background: transparent;
  border: 1.5px solid var(--gold-dark);
  color: var(--gold-dark);
}
.source-btn-locked:hover { background: var(--gold-dark); color: #fff; }

/* Auth Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.auth-modal-box { padding: 36px 32px 32px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px;
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: -4px;
}
.auth-form input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  background: #fafaf8;
}
.auth-form input:focus { border-color: var(--gold); }
.auth-error {
  font-size: 13px;
  color: #c00;
  background: #fff5f5;
  border: 1px solid #fcc;
  border-radius: 6px;
  padding: 8px 12px;
}
.auth-submit-btn {
  margin-top: 6px;
  padding: 11px;
  background: var(--gold-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-submit-btn:hover { background: var(--gold); }
.auth-switch {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin: 6px 0 0;
}
.auth-link {
  background: none;
  border: none;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 768px) {
  .author-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .author-hero-photo { width: 100px; height: 120px; }
  .authors-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .author-card-photo-wrap { height: 160px; }
  .sources-auth-inner { flex-direction: column; align-items: flex-start; }
  .sources-grid { grid-template-columns: 1fr; }
  .reading-nav { flex-direction: column; align-items: center; text-align: center; }
  .reading-container { padding: 28px 18px 90px; }
  .reading-content { font-size: 1.05rem; line-height: 1.85; }
  .reading-paragraph { text-align: left; }
  .reading-toolbar { top: 8px; padding: 6px 8px; gap: 8px; }
  .reading-tool-label { display: none; }
  .reading-tool-btn { min-width: 34px; height: 32px; }
  .reading-pager { padding: 12px; gap: 8px; }
  .reading-pager-btn { padding: 8px 12px; font-size: 13px; }
  .reading-pager-info { font-size: 13px; }
  .reading-paragraph:first-of-type::first-letter { font-size: 2.6em; }
}
