/* ============================================================
   MATNSHUNOSLIK — EXTRAS: Illuminated Manuscript Dekorlar
   ============================================================ */

/* ---- NAVBAR: Ko'p rangli illuminatsiya chizig'i ---- */
.navbar {
  border-top: 4px solid transparent;
  border-image: repeating-linear-gradient(
    90deg,
    #8b1a2f 0px,  #8b1a2f 8px,
    #b8860b 8px,  #b8860b 16px,
    #b07d52 16px, #b07d52 24px,
    #b8860b 24px, #b8860b 32px,
    #2a5040 32px, #2a5040 40px,
    #b8860b 40px, #b8860b 48px
  ) 4 / 4px / 0 stretch;
}

/* ---- PAGE HERO: Boy fon + illuminatsiya ---- */
.page-hero {
  position: relative;
  padding: 140px 0 64px;
  text-align: center;
  overflow: hidden;
  background: var(--bg-parchment);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(184,134,11,0.14), transparent 55%),
    radial-gradient(ellipse at 0% 100%,  rgba(139,26,47,0.06),  transparent 45%),
    radial-gradient(ellipse at 100% 100%,rgba(42,80,64,0.05),   transparent 45%);
  pointer-events: none;
}
.page-hero-top-rule {
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg,
    #8b1a2f 0%, #b8860b 25%, #b07d52 50%, #b8860b 75%, #8b1a2f 100%
  );
}
.page-hero-icon  { font-size: 3.4rem; margin-bottom: 14px; display: block; filter: drop-shadow(0 2px 4px rgba(184,134,11,0.3)); }
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700; color: var(--ink-dark);
  margin-bottom: 12px;
}
.page-hero-desc { color: var(--text-secondary); max-width: 560px; margin: 0 auto 36px; font-size: 1.05rem; }

/* ---- FILTER TUGMALARI ---- */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
  margin-bottom: 16px;
}
.filter-btn {
  padding: 7px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(100,72,30,0.22);
  background: rgba(255,252,240,0.7);
  color: #6b4f38;
  cursor: pointer;
  font-size: 0.83rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 500;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}
.filter-btn:hover  { border-color: #b8860b; color: #8a6a08; background: rgba(184,134,11,0.07); }
.filter-btn.active {
  background: rgba(184,134,11,0.12);
  border-color: #b8860b;
  color: #8a6a08;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(184,134,11,0.15);
}

/* ---- SECTION LABEL: Boyitilgan ---- */
.section-label {
  font-family: 'Cinzel', serif !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.22em !important;
  color: #8b1a2f !important; /* ruby emas gold o'rniga */
  position: relative;
}
.section-label::before { content: '✦ ' !important; }
.section-label::after  { content: ' ✦' !important; }

/* ---- SECTION TITLE: Kuchaytirilgan ---- */
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #2c1a0a;
  letter-spacing: 0.01em;
}

/* ---- STATS SECTION: Har bir raqam o'z aksenti bilan ---- */
.stat-number {
  background: linear-gradient(135deg, #b8860b, #d4a520);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3.2rem !important;
}
.stat-item:nth-child(2) .stat-number {
  background: linear-gradient(135deg, #8b1a2f, #b52b43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item:nth-child(3) .stat-number {
  background: linear-gradient(135deg, #2a5040, #3d7a60);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item:nth-child(4) .stat-number {
  background: linear-gradient(135deg, #1a3a6e, #2a5aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- CARDS: Qo'lyozma faktura + boy border ---- */
.card, .author-card, .work-card {
  background: linear-gradient(158deg, #fdfaf2 0%, #f8f0de 100%) !important;
  position: relative;
}
.card::after, .author-card::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0px, transparent 22px,
    rgba(184,134,11,0.012) 22px, rgba(184,134,11,0.012) 23px
  );
  border-radius: inherit;
  pointer-events: none;
}

/* ---- MODAL: Ko'p rangli yuqori chegara ---- */
.modal::before {
  background: linear-gradient(90deg, #8b1a2f, #b8860b, #b07d52, #b8860b, #8b1a2f) !important;
  border-radius: 16px 16px 0 0;
}

/* ---- FOOTER: Illuminatsiya ---- */
.footer {
  position: relative;
  background: linear-gradient(to bottom, #f0e8d0, #e8ddb8) !important;
}
.footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #8b1a2f 0px, #8b1a2f 8px,
    #b8860b 8px, #b8860b 16px,
    #b07d52 16px, #b07d52 24px,
    #b8860b 24px, #b8860b 32px
  );
  opacity: 0.5;
}

/* ---- SCROLLBAR: Boy rang ---- */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b8860b, #8b1a2f) !important;
}

/* ---- QUICK ACCESS CARDS ---- */
.quick-card {
  background: linear-gradient(158deg, #fdfaf2 0%, #f8f0de 100%) !important;
}
.quick-card::before {
  background: linear-gradient(90deg, #8b1a2f, #b8860b, #b07d52) !important;
}
.quick-arrow { color: #8b1a2f !important; }

/* ---- ORNAMENTAL DIVIDER ---- */
.ornamental-divider::before,
.ornamental-divider::after {
  background: linear-gradient(90deg, transparent, rgba(139,26,47,0.3), rgba(184,134,11,0.5), rgba(139,26,47,0.3), transparent) !important;
}

/* ---- HERO ILMIY MATN: Boy ko'rinish ---- */
.hero-title { letter-spacing: 0.005em; }
.hero-title-line2 { color: #8b1a2f !important; }

/* ---- HERO QIDIRUV ---- */
.search-input:focus {
  border-color: #b8860b !important;
  box-shadow: 0 0 0 3px rgba(184,134,11,0.12), 0 4px 20px rgba(100,60,20,0.12) !important;
}

/* ---- BTN SECONDARY: Ruby rang ---- */
.btn-secondary {
  color: #8b1a2f !important;
  border-color: #8b1a2f !important;
}
.btn-secondary:hover {
  background: rgba(139,26,47,0.08) !important;
  color: #b52b43 !important;
  border-color: #b52b43 !important;
}

/* ---- HERO LANG ITEM ---- */
.hero-lang-item {
  border-color: rgba(139,26,47,0.2) !important;
  color: #8b1a2f !important;
  font-family: 'Cinzel', serif;
}

/* ---- HERO EYEBROW ---- */
.hero-eyebrow {
  background: rgba(139,26,47,0.06) !important;
  border-color: rgba(139,26,47,0.18) !important;
  color: #8b1a2f !important;
}

/* ---- HERO SCROLL HINT ---- */
.scroll-line { background: linear-gradient(to bottom, #b8860b, transparent) !important; }

/* ---- BADGE GOLD: Yanada boy ---- */
.badge-gold {
  background: rgba(184,134,11,0.1) !important;
  color: #7a5808 !important;
  border-color: rgba(184,134,11,0.28) !important;
}

/* ---- TIMELINE PREVIEW ITEM ---- */
.tpi-year { color: #8b1a2f !important; }
.timeline-preview-item:hover {
  border-color: rgba(184,134,11,0.5) !important;
  box-shadow: 0 4px 20px rgba(184,134,11,0.15) !important;
}

/* ---- AUTHOR CARD: Chiroyli gradient header ---- */
.author-card-header {
  background: linear-gradient(145deg, #fdfaf2, #f0e5cc) !important;
}
.author-years { color: #8b1a2f !important; }
.author-read-more { color: #8b1a2f !important; }

/* ---- MODAL SECTION TITLE ---- */
.modal-section-title { color: #8b1a2f !important; }

/* ---- DEKORATIV SAHIFA CHET CHIZIG'I ---- */
.page-edge {
  border-left: 3px solid;
  border-image: linear-gradient(180deg, #b8860b, #8b1a2f, #2a5040, #8b1a2f, #b8860b) 1;
  padding-left: 16px;
  margin-left: -3px;
}

/* ---- KICHIK DEKOR: Arabiy zig-zag ---- */
.zigzag-rule {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    #b8860b, #b8860b 3px,
    transparent 3px, transparent 6px
  );
  margin: 24px 0;
  opacity: 0.3;
}

/* ---- SECTION ALT: Boyroq fon ---- */
.section-alt {
  background: linear-gradient(to bottom, #f0e8d0, #ece0c2) !important;
}

/* ---- STAT ITEM: Hover effekt ---- */
.stat-item:hover { background: rgba(184,134,11,0.05) !important; }
.stat-label {
  font-family: 'Cinzel', serif !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.14em !important;
}

/* ---- LINK RENGI ---- */
a:not(.btn):not(.nav-link):not(.nav-logo):not(.footer-links a) {
  border-bottom: 1px dotted rgba(184,134,11,0.4);
  transition: border-color 0.15s ease;
}
a:not(.btn):not(.nav-link):not(.nav-logo):not(.footer-links a):hover {
  border-bottom-color: #b8860b;
}

/* ---- HERO MANUSCRIPT CARD: Kuchaytirilgan ---- */
.ms-line-header {
  height: 4px !important;
  background: linear-gradient(90deg, #8b1a2f, #b8860b) !important;
}
.ms-line-ruby  { background: rgba(139,26,47,0.4) !important; }
.ms-line-gold  { background: rgba(184,134,11,0.45) !important; }
.ms-seal { border-color: rgba(184,134,11,0.6) !important; }
