:root {
  --primary: #1a3a5c;
  --primary-light: #2563a8;
  --accent: #f0a500;
  --accent-soft: #fff3cd;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #dde3ee;
  --text: #1e2a3a;
  --muted: #6b7a92;
  --success: #0d7a55;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(26, 58, 92, .10);
  --shadow-hover: 0 8px 32px rgba(26, 58, 92, .18);
}





.hide {
  display: none !important;
}


*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


button {
  font-family: inherit;
}

body {
  font-family: 'iransansxf', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
}


header {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2744 60%, #1a3a5c 100%);
  background: var(--primary);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}

.header-inner {
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent), #e08800);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  /* box-shadow: 0 2px 8px rgba(240, 165, 0, .4); */
}

.logo-icon svg {
  color: #1a3a5c;
}

.logo-text {
  color: #fff;
  line-height: 1;
}

.logo-text strong {
  font-size: 1.15rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}

.logo-text span {
  font-size: .7rem;
  font-weight: 300;
  opacity: .75;
  letter-spacing: .03em;
}

nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

nav a {
  color: rgba(255, 255, 255, .80);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 300;
  padding: .45rem .9rem;
  border-radius: 8px;
  transition: all .2s;
  white-space: nowrap;
}

nav a:hover {
  /* background: rgba(255, 255, 255, .12);
  color: #fff; */
}

nav a.active {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
}

.btn-outline-white {
  border: 1.5px solid rgba(255, 255, 255, .45);
  color: #fff;
  background: transparent;
  border-radius: 8px;
  padding: .42rem 1rem;
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: .5rem 1.1rem;
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}

.btn-accent:hover {
  background: #e09800;
  /* box-shadow: 0 2px 10px rgba(240, 165, 0, .4); */
}


.hero {
  background: linear-gradient(160deg, #1a3a5c 0%, #162d4a 50%, #0f2035 100%);
  padding: 3.5rem 2rem 0;
  position: relative;
  overflow: hidden;
  background: url(../img/library-book.png);
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(240, 165, 0, .12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 5%;
  width: 280px;
  height: 280px;
  /* background: radial-gradient(circle, rgba(37, 99, 168, .25) 0%, transparent 70%); */
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(240, 165, 0, .15);
  border: 1px solid rgba(240, 165, 0, .35);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .9rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: .8rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  color: rgba(255, 255, 255, .68);
  font-size: clamp(.88rem, 1.6vw, 1.0rem);
  line-height: 1.8;
  /* max-width: 660px; */
  margin: 0 auto 2rem;
  font-weight: 300;
}


.search-wrap {
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 25px #0002;
}

.search-row {
  display: flex;
  gap: .6rem;
  margin-bottom: 1rem;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}



.search-input-wrap .s-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .45);
  font-size: 1.1rem;
  pointer-events: none;
  display: flex;
}

.search-input-wrap .s-icon svg {
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  background-color: rgba(255, 255, 255, .10);
  border: 1.5px solid rgba(255, 255, 255, .20);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 300;
  padding: .85rem 3rem .85rem 1.2rem;
  outline: none;
  transition: all .25s;

}

.search-input::placeholder {
  color: rgba(255, 255, 255, .40);
  font-size: 0.9rem;
}

.search-input:focus {
  background-color: rgba(255, 255, 255, .16);
  border-color: #ffc74b24;
  box-shadow: 0 0 5px 2px rgb(255 227 165 / 7%);
}



input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  /* Forces the text color to be white */
  -webkit-text-fill-color: white !important;

  /* Delays Chrome's background override for a very long time */
  transition: background-color 9999s ease-in-out 0s;
}





.search-btn {
  background: linear-gradient(135deg, var(--accent), #d98a00);
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 12px;
  padding: .85rem 2rem;
  font-size: .95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  /* box-shadow: 0 4px 14px rgba(240, 165, 0, .15); */
}

.search-btn:hover {
  /* transform: translateY(-1px); */
  /* box-shadow: 0 6px 20px rgba(240, 165, 0, .45); */
  background: #d39103;
}

.search-btn:active {
  transform: translateY(0);
}


.search-btn svg {
  width: 19px;
  height: 19px;
}

.search-options {
  display: flex;
  gap: 1.2rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.search-options label {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255, 255, 255, .6);
  font-size: .8rem;
  cursor: pointer;
  user-select: none;
}

.search-options input[type=checkbox] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}


.search-btn {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-btn:disabled {
  opacity: 0.7;
  /* cursor: not-allowed; */
}








.tabs-section {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(26, 58, 92, .08);
  margin-top: .5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: opacity 0.3s ease-out, transform 0.4s ease-out, visibility 0.4s;

}


.tabs-section.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}




.tabs-header {
  padding: 1.2rem 1.5rem 0;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
  display: none;
}

.tabs-nav {
  display: flex;
  gap: .25rem;
  min-width: max-content;
  justify-content: center;
}



.tab-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.2rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 8px 8px 0 0;
  transition: all .2s;
  white-space: nowrap;
  /* flex-grow: 1; */
  justify-content: center;
}


.tab-btn:hover {
  color: var(--primary-light);
  background: rgba(37, 99, 168, .06);
}

.tab-btn.active {
  color: #ffffff;
  font-weight: 700;
  border-bottom-color: #1a3a5c5c;
  background: rgb(26 58 92);
}


.tabs-nav .tab-btn {
  flex-grow: 0;
}

.tabs-nav .tab-btn:nth-last-child(n+4),
.tabs-nav .tab-btn:nth-last-child(n+4)~.tab-btn {
  flex-grow: 1;
}


.tab-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: .85rem;
  flex-shrink: 0;
  display: none;
}

.tab-count {
  background: #1a3a5c17;
  color: #1a3a5c;
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.tab-btn.active .tab-count {
  background: #728dab8c;
  color: white;
}




.tabs-nav {
  position: relative;
  display: flex;
  z-index: 1;
}


.active-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  background-color: rgb(26 58 92);
  border-radius: 8px 8px 0 0;
  z-index: -1;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}


.tab-btn {
  background-color: transparent !important;
  position: relative;
  z-index: 2;

}









.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0rem 3rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}


.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0;
  /* box-shadow: var(--shadow); */
  border: 1px solid var(--border);
  transition: 0.2s;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 7%);
}

.filter-card h4 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  /* margin-bottom: .4rem; */
  padding-bottom: .6rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: .4rem;
  background: #edf4ff;
  padding: 10px 10px;
  justify-content: space-between;
  cursor: pointer;
}

.filter-card h4 svg {
  height: 16px;
  width: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .8rem;
}

.filter-group-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.filter-item label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text);
  user-select: none;
  width: 100%
}

.filter-item label:hover {
  color: #000;
  font-weight: 400;
}

.filter-item input[type=checkbox] {
  accent-color: var(--primary-light);
}

.filter-badge {
  font-size: .72rem;
  background: var(--bg);
  color: var(--muted);
  padding: .1rem .45rem;
  border-radius: 8px;
}




.source-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .7rem;
  border-radius: 18px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .2s;
  margin: .15rem;
  position: relative;
  user-select: none;
}

.source-tag.ganj {
  background: #e8f4e836;
  color: #c7ffc7;
  border-color: #b8ddb833;
}

.source-tag.civilica {
  background: #e8eef845;
  color: #cad9ff;
  border-color: #b8cce842;
}

.source-tag.scholar {
  background: #fce8e83d;
  color: #ffd1d1;
  border-color: #e8b8b833;
}

.source-tag.magiran {
  background: #fff0e03d;
  color: #ffcf97;
  border-color: #e8cc9942;
}

.source-tag.sid {
  background: #e8e8f83d;
  color: #b2eced;
  border-color: #c8c8e845;
}

.source-tag.noormags {
  background: #f0e8f83d;
  color: #e1b9ff;
  border-color: #d8b8e854;
}

.source-tag:not(.active) {
  opacity: .45;
}

.source-tag.active {
  opacity: 1;
  padding-right: 28px;
  border: 1px solid;
}



.source-tag.active {
  opacity: 1;
  padding-right: 25px;
  border: 1px solid;
}

.source-tag.active::before {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  background-color: currentColor;
  right: 7px;
  border-radius: 50%;
  animation: popIn .25s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

.source-tag.active::after {
  content: '';
  position: absolute;
  right: 11px;
  top: 50%;
  width: 4px;
  height: 7px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-color: rgba(0, 0, 0, .55);
  transform: translateY(-65%) rotate(45deg) scale(0);
  animation: checkIn .2s .15s cubic-bezier(0.54, 1.56, .64, 1) forwards;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkIn {
  from {
    transform: translateY(-65%) rotate(45deg) scale(0);
  }

  to {
    transform: translateY(-65%) rotate(45deg) scale(1);
  }
}





.range-row {
  display: flex;
  gap: .4rem;
  align-items: center;
  padding: 10px;
  flex-direction: row-reverse;
}

.range-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: .4rem .6rem;
  font-family: inherit;
  font-size: .82rem;
  outline: none;
  transition: border .2s;
  direction: ltr;
  text-align: center;
}

.range-input:focus {
  border-color: var(--primary-light);
}




.sectionLabel {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accentColor);
  margin-bottom: 8px;
}

.sectionLabel::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accentColor);
  border-radius: 2px;
}

.sectionTitle {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.sectionSubtitle {
  font-size: 14px;
  color: var(--textSecondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.articlesSection {
  padding: 80px 0;
}

.articleCard {
  background: #fff;
  border: 1.5px solid #e8edf5;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.articleCard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadowLg);
  border-color: rgba(233, 69, 96, 0.25);
}

.articleCardThumb {
  height: 160px;
  position: relative;
  overflow: hidden;
}

.articleCardThumbBg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.articleThumbGradient1 {
  background: linear-gradient(135deg, #1a1a2e, #e94560);
}

.articleThumbGradient2 {
  background: linear-gradient(135deg, #0f3460, #533483);
}

.articleThumbGradient3 {
  background: linear-gradient(135deg, #533483, #1a73e8);
}

.articleCategoryBadge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  color: white;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.articleCardBody {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.articleCardTitle {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.55;
  margin-bottom: 10px;
  flex: 1;
}

.articleCardMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #e8edf5;
  margin-top: 12px;
}

.articleCardAuthor {
  font-size: 12px;
  color: #8a9ab0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.articleCardDate {
  font-size: 11px;
  color: #8a9ab0;
}

.articleReadMore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accentColor);
  text-decoration: none;
  margin-top: 12px;
  transition: gap 0.2s ease;
}

.articleReadMore:hover {
  gap: 8px;
  color: var(--accentColor);
}





.databaseStatsSection {
  position: relative;
  padding: 5rem 2rem;
  overflow: hidden;

}

.statsBackdrop {
  position: absolute;
  inset: 0;
  /* background:
     radial-gradient(ellipse at 20% 50%, rgba(240, 165, 0, .08) 0%, transparent 60%),
     radial-gradient(ellipse at 80% 20%, rgba(37, 99, 168, .15) 0%, transparent 55%),
     radial-gradient(ellipse at 60% 80%, rgba(240, 165, 0, .05) 0%, transparent 50%); */
  pointer-events: none;
}

.statsInner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  z-index: 1;
}

.statsSectionHeader {
  text-align: center;
  margin-bottom: 3rem;
}

.statsSectionTitle {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  color: #000;
  margin-bottom: .5rem;
}

.statsSectionSubtitle {
  font-size: .9rem;
  color: rgb(0 0 0 / 50%);
}

.statsSourceGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.sourceStatCard {
  background: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.sourceStatCard:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
}

.sourceCardGanj {
  border-top: 3px solid #2da82d;
}

.sourceCardCivilica {
  border-top: 3px solid #2563a8;
}

.sourceCardScholar {
  border-top: 3px solid #c53030;
}

.sourceCardMagiran {
  border-top: 3px solid #d97706;
}

.sourceCardHeader {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.sourceCardIconWrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.sourceIconGanj {
  background: rgba(45, 168, 45, .18);
}

.sourceIconCivilica {
  background: rgba(37, 99, 168, .22);
}

.sourceIconScholar {
  background: rgba(197, 48, 48, .18);
}

.sourceIconMagiran {
  background: rgba(217, 119, 6, .18);
}

.sourceCardName {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
}

.sourceCardDesc {
  font-size: .72rem;
  color: rgba(255, 255, 255, .45);
  margin-top: .15rem;
}

.sourceCardDivider {
  height: 1px;
  background: rgba(255, 255, 255, .08);
}

.statRowGrid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1;
}

.statRowItem {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.statRowLabel {
  font-size: .75rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
}

.statRowValues {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.statChip {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 7px;
  padding: .22rem .6rem;
  font-size: .73rem;
  color: rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.statChip strong {
  color: #000;
  font-weight: 700;
  margin-right: .2rem;
}

.sourceCardTotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgb(134 149 50 / 7%);
  border: 1px solid rgb(131 148 49 / 18%);
  border-radius: 10px;
  padding: .6rem .9rem;
  margin-top: auto;
}

.totalLabel {
  font-size: .75rem;
  color: #6e810d;
  font-weight: 500;
}

.totalValue {
  font-size: .95rem;
  font-weight: 800;
  color: #6e810d;
}

@media (max-width: 1100px) {
  .statsSourceGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .databaseStatsSection {
    padding: 3rem 1rem;
  }

  .statsSourceGrid {
    grid-template-columns: 1fr;
  }

  .sourceStatCard {
    padding: 1.2rem;
  }
}




.results-column table {
  width: 100%;
  /* border: 1px solid #e5e7eb; */
  border-radius: 4px;
  border-collapse: collapse;
  border-spacing: 0;
}

.results-column table tbody tr:nth-child(even) .result-card {
  background-color: #f6f8fa;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: .9rem;
}

.results-count {
  font-size: .88rem;
  color: var(--muted);
}

.results-count strong {
  color: var(--primary);
  font-weight: 700;
}

.sort-select {
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  padding: .42rem .9rem;
  font-family: inherit;
  font-size: .82rem;
  outline: none;
  cursor: pointer;
  color: var(--text);
  width: 200px;
}

.sort-select:focus {
  border: 1px solid #0009;
}

.view-toggle {
  display: flex;
  gap: .25rem;
}

.view-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .9rem;
  transition: all .2s;
  color: var(--muted);
}

.view-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}


.result-card {
  /* background: var(--card);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  transition: all .25s;
  position: relative;
  overflow: hidden; */
}

/* .result-card::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0 var(--radius) var(--radius) 0;
} */

.result-card.ganj::before {
  background: #2da82d;
}

.result-card.civilica::before {
  background: #2563a8;
}

.result-card.scholar::before {
  background: #c53030;
}

.result-card.magiran::before {
  background: #d97706;
}

.result-card.sid::before {
  background: #5b21b6;
}

.result-card:hover {
  /* box-shadow: var(--shadow-hover); */
  border-color: var(--primary-light);
  /* transform: translateY(-2px); */
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}

.card-source-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .22rem .65rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.badge-ganj {
  background: #e8f4e8;
  color: #1a7a1a;
}

.badge-civilica {
  background: #e8eef8;
  color: #1a3a8a;
}

.badge-scholar {
  background: #fce8e8;
  color: #8a1a1a;
}

.badge-magiran {
  background: #fff0e0;
  color: #8a4a00;
}

.badge-sid {
  background: #e8e8f8;
  color: #3a1a8a;
}

.card-actions {
  display: flex;
  gap: .4rem;
}
.badge-sad {
  background: #e8e8f8;
  color: #6c5dd4;
}
.badge-doaji {
  background-color: #e8e8f8;
  color: #6980cb;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .85rem;
  transition: all .2s;
  color: var(--muted);
}

.icon-btn:hover {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--primary-light);
}


.icon-btn svg {
  width: 18px;
  height: 18px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
  line-height: 1.5;
  cursor: pointer;
  display: inline-block;
}

.card-title:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.card-authors {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.card-abstract {
  font-size: .84rem;
  color: #4a5568;
  line-height: 1.75;
  margin-bottom: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
  justify-content: space-between;
}

.metas {
  display: flex;
  gap: 14px;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .78rem;
  color: var(--muted);
}

.meta-item.highlight {
  /* color: var(--success); */
  /* font-weight: 600; */
}


.meta-item svg {
  width: 15px;
  height: 15px;
}


.keyword-chip {
  background: rgba(37, 99, 168, .08);
  color: var(--primary-light);
  border-radius: 6px;
  padding: .15rem .55rem;
  font-size: .73rem;
  font-weight: 500;
  cursor: pointer;
  margin-right: 5px;
  display: inline-block;
}

.keyword-chip:hover {
  background: rgba(37, 99, 168, .16);
}


.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .9rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-info strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-info span {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .2rem;
  display: block;
}


.stats-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 36px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #ffffffd1;
  display: block;
}

.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}


.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 2rem;
}

.page-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .88rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--muted);
  transition: all .2s;
}

.page-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}





footer {
  /* background: #0f2035;
   color: rgba(255, 255, 255, .65);
   padding: 2rem;
   margin-top: 3rem; */
}

.footer-inner {
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  font-size: .8rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, .55);
  font-size: .78rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}


@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f8f8f8 50%, #eee 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}


@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
    display: none;
  }

  nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .search-row {
    flex-direction: column;
  }

  .header-inner {
    gap: .6rem;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }
}


.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}











.recentItemsSection {
  padding: 5rem 2rem;
  background: #f4f6f9;
}

.recentInner {
  max-width: 1280px;
  margin: 0 auto;
}


.recentHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.recentHeaderText {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.recentBadge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(14, 52, 98, 0.08);
  border: 1px solid rgba(14, 52, 98, 0.18);
  color: #0e3462;
  font-size: .75rem;
  font-weight: 700;
  padding: .3rem .8rem;
  border-radius: 20px;
  width: fit-content;
}

.recentBadge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #f0a500;
  border-radius: 50%;
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .4;
    transform: scale(.7);
  }
}

.recentTitle {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 800;
  color: #0e2a4a;
  margin: 0;
}

.recentSubtitle {
  font-size: .85rem;
  color: #6b7a90;
  margin: 0;
}

.recentViewAll {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #0e3462;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(14, 52, 98, 0.25);
  padding: .5rem 1.1rem;
  border-radius: 8px;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
  background: #fff;
}

.recentViewAll:hover {
  background: #0e3462;
  color: #fff;
  border-color: #0e3462;
}


.recentGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}


.recentCard {
  display: flex;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
}

.recentCard:hover {
  /* transform: translateY(-4px); */
  box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
  border-color: #c8d4e3;
}

.recentCardAccent {
  width: 4px;
  flex-shrink: 0;
}

.accentGanj {
  background: #2da82d;
}

.accentCivilica {
  background: #2563a8;
}

.accentScholar {
  background: #c53030;
}

.recentCardBody {
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  flex: 1;
  min-width: 0;
}


.recentCardMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.sourceTag {
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 6px;
}

.sourceTagGanj {
  background: #e6f7e6;
  color: #1a7a1a;
}

.sourceTagCivilica {
  background: #e8f0fb;
  color: #1a4f9c;
}

.sourceTagScholar {
  background: #fdeaea;
  color: #a01e1e;
}

.recentYear {
  font-size: .72rem;
  color: #94a3b8;
  font-weight: 500;
}


.recentCardTitle {
  font-size: .9rem;
  font-weight: 700;
  color: #1a2e4a;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recentCard:hover .recentCardTitle {
  color: #0e3462;
}


.recentCardAuthors {
  font-size: .75rem;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.recentCardAbstract {
  font-size: .78rem;
  color: #7a8fa6;
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}


.recentCardFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .65rem;
  border-top: 1px solid #f0f4f8;
  margin-top: auto;
}

.publisherTag {
  font-size: .7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

.citationCount {
  font-size: .7rem;
  color: #f0a500;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}


@media (max-width: 1024px) {
  .recentGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .recentItemsSection {
    padding: 3rem 1rem;
  }

  .recentGrid {
    grid-template-columns: 1fr;
  }

  .recentHeader {
    flex-direction: column;
    align-items: flex-start;
  }

  .recentViewAll {
    width: 100%;
    justify-content: center;
  }
}




.dataTable th {
  border: 0;
  background: transparent;
  padding: 2px;
}


.dataTable td {
  background: transparent;
  border: 0;
  padding: 0;
}

.active>.page-link,
.page-link.active {
  background-color: #1a3a5c;
  border: 1px solid;
}

.page-link {
  background: transparent;
  border: 1px solid #1a3a5c82;
  border-radius: 9px;
  min-width: 32px;
  font-size: 12px;
  color: #1a3a5c;
  text-align: center;
  padding: 6px;
}

.page-link:not(.active .page-link):hover {

  border: 1px solid #1a3a5c82;

  color: #1a3a5c;
  text-align: center;

  background-color: #1a3a5c0d;
}

.disabled>.page-link,
.page-link.disabled {
  background: #ffffff3d;
}

.page-item:last-child .page-link,
.page-item:first-child .page-link {
  border-top-right-radius: var(--bs-pagination-border-radius);
  border-bottom-right-radius: var(--bs-pagination-border-radius);
  padding: 5px 10px;
}

div.dataTables_wrapper div.dataTables_info {
  padding-top: .85em;
  font-size: 13px;
}

div.dataTables_wrapper div.dataTables_length label {
  font-weight: normal;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
  color: var(--primary);
}

div.dataTables_wrapper div.dataTables_filter {
  text-align: left;
  font-size: 13px;
  color: var(--primary);
}

div.dataTables_wrapper div.dataTables_filter input {
  margin-left: 0;
  margin-right: .5em;
  display: inline-block;
  width: auto;
  padding: 7px;
  width: 200px;
  border-radius: 8px;
}

div.dataTables_wrapper div.dataTables_filter input:focus {
  box-shadow: none;
  border: 1px solid #0008;
}

div.dataTables_wrapper div.dataTables_length select {
  cursor: pointer;
  padding: 7px 33px 7px 7px;
  font-size: 14px;
  border-radius: 8px;
}

div.dataTables_wrapper div.dataTables_length select:focus {
  box-shadow: none;
  border: 1px solid #0008;

}


@keyframes spin-gpu {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.gpu-spinner {
  animation: spin-gpu 1s linear infinite;
  will-change: transform;
  transform-origin: center;
}





.topFilterSection {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #ffffffa6;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e5e7eb);
  gap: 14px;
  flex-direction: column;
  color: #4a5568;
  font-size: 0.85rem;
  background-color: #f9fbff6b;
}

.topFilterSection .top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.topFilterSection .bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid #0000000f;
  padding-top: 15px;
}

.topFilterSection .SortRes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topFilterSection select {
  padding: 0.4rem;
  border-radius: 4px;
  border: 1px solid rgb(204 204 204 / 53%);
  font-family: inherit;
  background-color: #ffffff9c;
  color: #222;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  min-width: 60px;
  transition: 0.2s;
}

.topFilterSection select:hover {
  background-color: #ffffffbe;
}

.topFilterSection select:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--primary-light);
}

.topFilterSection .searchRes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.topFilterSection .searchRes input {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid rgb(204 204 204 / 53%);
  font-family: inherit;
  font-size: 0.8rem;
  background-color: #ffffff9c;
  border-radius: 4px;
  transition: 0.2s;
}

.topFilterSection .searchRes input:hover {

  background-color: #ffffffbe;
}


.topFilterSection .searchRes input:focus,
.topFilterSection .searchRes input:focus-visible {
  outline: none;
  border: 1px solid #0008;
  border-color: var(--primary-light);
}

.topFilterSection .changeRes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topFilterSection .resCount {
  font-size: 0.85rem;
  color: #4a5568;
  font-weight: 400;
}




.bottomSearchSection {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #e9eaef80;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1rem;
}


.prevPage,
.nextPage {
  cursor: pointer;
  padding: 0.4rem 1rem;
  border-radius: 26px;
  border: 1px solid rgb(204 204 204 / 62%);
  background-color: rgb(255, 255, 255);
  color: rgb(55, 65, 81);
}

.prevPage[disabled],
.nextPage[disabled] {
  border: 1px solid rgb(204, 204, 204);
  background-color: rgb(243, 244, 246);
  color: rgb(156, 163, 175);
}

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  direction: ltr;
  /* برای حفظ ترتیب اعداد و فلش‌ها در طراحی استاندارد */
}

.pagination-arrow,
.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  color: #475569;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pagination-arrow:hover:not(:disabled),
.pagination-number:hover:not(.active) {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* حالت فعال (صفحه فعلی) */
.pagination-number.active {
  background-color: #1a3a5c;
  /* رنگ برند خود را جایگزین کنید */
  color: #ffffff;
  border-color: #1a3a5c;
}

/* حالت غیرفعال دکمه‌های قبلی/بعدی */
.pagination-arrow:disabled {
  opacity: 0.5;
  cursor: default;
  background-color: #f8fafc;
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: #94a3b8;
  font-weight: bold;
  letter-spacing: 2px;
}

.pagination-numbers {
  display: flex;
  gap: 0.3rem;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 480px) {
  .pagination-container {
    gap: 0.25rem;
  }

  .pagination-arrow,
  .pagination-number {
    min-width: 32px;
    height: 32px;
    font-size: 0.85rem;
    padding: 0 0.3rem;
  }

  /* در موبایل‌های خیلی کوچک می‌توان صفحات میانی را پنهان کرد (اختیاری) */
  /*
  .pagination-numbers > :not(.active):not(:first-child):not(:last-child) {
    display: none;
  }
  */
}



.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* فاصله بین آیکون و متن */
  /* سایر استایل‌های قبلی دکمه خود را اینجا حفظ کنید */
}

/* انیمیشن چرخش */
.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}




@media (min-width: 768px) {

  /* حالت اولیه کارت‌ها قبل از شروع انیمیشن */
  .instantAnim.obs-scale {
    opacity: 0;
    animation: scaleAnim 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--delay, 0s);
  }

  /* تعریف انیمیشن اسکیل */
  @keyframes scaleAnim {
    0% {
      opacity: 0;
      transform: scale(0.95) translateY(15px);
    }

    100% {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}