/* =================== SCIENCEDIRECT-LIKE TYPOGRAPHY =================== */
:root{
  --text: #1d1d1f;
  --muted: #6b7280;
  --link: #2563eb;
  --border: #e5e7eb;
  --bg-soft:#fbfbfd;
}
#article{
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}
#article p{ margin: .65rem 0 1rem; }
#article h1,#article h2,#article h3,#article h4{
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color:#0f172a;
  line-height:1.25;
  margin: 1.4rem 0 .6rem;
}
#article h1{ font-size:1.75rem; margin-top:1.75rem; }
#article h2{ font-size:1.2rem; border-bottom:1px solid var(--border); padding-bottom:.35rem; }
#article h3{ font-size:1.15rem; }
#article h4{ font-size:1.05rem; }
#article a{ color: var(--link); text-decoration: none; }
#article a:hover{ text-decoration: underline; }
#article img{ max-width:100%; height:auto; display:block; margin: .5rem auto; }
#article table{ width:100%; border-collapse: collapse; margin: .75rem 0 1.25rem; font-size: .98em; }
#article table th, #article table td{ border:1px solid var(--border); padding:.55rem .6rem; vertical-align: top; }
#article figure, .figure-box{
  background:#fff; border:1px solid var(--border); border-radius:.5rem; padding:.6rem .6rem .4rem; margin:1rem 0 1.25rem;
}
#article figcaption, .caption, .tbl-cap{
  font-family: ui-sans-serif, system-ui; color:#334155; font-size:.9em; margin-top:.35rem;
}
#article code{ background:#f3f4f6; padding:.1rem .3rem; border-radius:.25rem; font-size:.95em; }
#article h1, #article h2, #article h3 { scroll-margin-top: 90px; }

/* Professional title above article */
.reader-title{
  word-break: break-word; hyphens: auto; letter-spacing:.1px; line-height:1.18;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
@media (min-width:992px){ .reader-title{ font-size:2.0rem; } }
@media (max-width:991.98px){ .reader-title{ font-size:1.35rem; } }

/* Chips (click on name) */
.author-chip{/*! border:1px solid var(--border); */border-radius:999px;/*! padding:.18rem .6rem; */background:#fff;display:inline-flex;gap:.4rem;align-items:center;cursor:pointer;font-weight: bold;}

/* Section/OpenAccess badges */
.badge-sec{background:#6c757d1a;color:#6c757d;border:1px solid #e9ecef;padding:.35rem .55rem;border-radius:.5rem;font-size:.75rem}
.badge-open{background:#16a34a1a;color:#166534;border:1px solid #ccebd6;padding:.35rem .55rem;border-radius:.5rem;font-size:.75rem}

/* Card-like blocks for fallback */
.card-like{background:#fff;border:1px solid var(--border);border-radius:.6rem;padding:1rem}

/* =================== TOC (LEFT) =================== */
/* Card styles + native sticky */
.toc-card{
  background:#fff;
  border:1px solid #e9ecef;
  border-radius:.75rem;
  box-shadow:0 .2rem .6rem rgba(0,0,0,.04);
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
  height: fit-content;
  align-self: flex-start;
  z-index: 2;
}
.toc-card .toc-head{font-weight:600;padding:.6rem .9rem;border-bottom:1px solid #eef2f4}
.toc-card .toc-body{max-height:calc(100vh - 160px);overflow:auto;padding:.5rem .6rem}
#toc ol{list-style:decimal;padding-left:1.1rem;margin:0}
#toc a{display:block;padding:.25rem 0;text-decoration:none;color:#495057}
#toc a.active{font-weight:700;text-decoration:underline}

/* Ensure the card fills the left column (normal flow) */
aside.col-lg-2 .toc-card{ /*! width: 100%; */ }
/* Lock TOC width fixed to 195px */
.toc-card.is-fixed {
  --toc-width: 180px !important;
  width: 185px !important;
}

/* Optional utility restore */
.position-sticky{ position: sticky !important; top: 90px; }

/* Kill common sticky killers on ancestors */
.container, .container-lg, .row,
aside.col-lg-2, main.col-lg-7, aside.col-lg-3 {
  overflow: visible !important;
  transform: none !important;
  perspective: none !important;
  filter: none !important;
  contain: none !important;
}

/* Ponyfill fixed-state (JS toggles .is-fixed) — width/left via CSS vars */
.toc-card.is-fixed{
  position: fixed !important;
  top: 90px !important;
  left: var(--toc-left, auto);
  width: var(--toc-width, auto);
  box-sizing: border-box;
  z-index: 3;
}
.toc-card .toc-body{ max-width: 100%; }

/* Small screens => disable fixed behavior for comfort */
@media (max-width: 991.98px){
  .toc-card.is-fixed{
    position: static !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
  }
}

/* =================== RIGHT TABS (3 fixed, one line) =================== */
#rightTabs{
  display:flex; gap:.25rem; flex-wrap:nowrap; white-space:normal;
}
#rightTabs .nav-item{ flex:1 0 0; min-width:0; /*! box-shadow: 0 .2rem .6rem rgba(0,0,0,.04); */}
#rightTabs .nav-link{
  width:100%; text-overflow:ellipsis; overflow:hidden; padding:.55rem .6rem;
}
.tab-content{border-radius:0 0 .5rem .5rem;background:#fff;box-shadow: 0 .2rem .6rem rgba(0,0,0,.04);}

/* =================== Author Drawer =================== */
.author-drawer{position:fixed;top:0;right:-420px;width:420px;max-width:92vw;height:100vh;background:#fff;border-left:1px solid #dee2e6;box-shadow:-8px 0 24px rgba(0,0,0,.08);z-index:10080;transition:right .28s ease}
.author-drawer.open{right:0}
.author-drawer .hdr{display:flex;justify-content:space-between;align-items:center;padding:.8rem 1rem;border-bottom:1px solid #eef2f4}
.author-drawer .bd{padding:1rem;overflow:auto;height:calc(100vh - 56px)}
.author-row{border:1px solid #eef2f4;border-radius:.5rem;padding:.75rem;margin-bottom:.75rem}
.author-row .meta{color:#6c757d}

/* Smooth scrolling */
html{scroll-behavior:smooth;}
/* ===== Mobile TOC bar (appears on <992px) ===== */
.toc-mobile-bar{
  position: fixed;          /* header ke niche chipak ke chale */
  left: 0;
  right: 0;
    /* header height (JS set karega), fallback 56 */
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  z-index: 100;            /* navbar (z ~ 1030) ke just neeche */
  margin-top: 8px;            /* default off; <992px pe on */
  /*! top: 120px; */
}

.toc-mobile-inner{
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  max-width: 1140px;        /* container style feel */
  margin: 0 auto;
}

.toc-mobile-label{
  font-size: .9rem;
  color: #6b7280;
  white-space: nowrap;
}

#tocMobileSelect{
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  background: #fff;
  font-size: .95rem;
}

/* Content push-down so bar overlap na kare */
.toc-mobile-spacer{
  height: calc(var(--hdr-h, 56px) + 0px); /* header + select bar approx */
  display: none;
}

/* Breakpoints: <992px => mobile TOC on, desktop TOC hide  */
@media (max-width: 991.98px){
  .toc-mobile-bar{ display: block; }
  .toc-mobile-spacer{ display: block; }
.main {
    padding-top: 0px;
  }
  /* Left sidebar TOC hide on mobile */
  aside.col-lg-2{ display: none !important; }
}
/* Default: mobile TOC hidden */
.toc-mobile-bar,
.toc-mobile-spacer{
  display: none !important;
}

/* Show ONLY on mobile (<992px) */
@media (max-width: 991.98px){
  .toc-mobile-bar,
  .toc-mobile-spacer{
    display: block !important;
  }
}


/* Extra safety: ensure hidden on desktop regardless of any theme overrides */
@media (min-width: 992px){
  .toc-mobile-bar,
  .toc-mobile-spacer{
    display: none !important;
  }
}
/* Hard-lock TOC width to 180px in fixed state (all modes) */
.toc-card.is-fixed {
  width: 180px !important;
  --toc-width: 180px !important; /* if any CSS uses this var */
  box-sizing: border-box;
}

/* Optional: normal (non-fixed) state may remain fluid */
aside.col-lg-2 .toc-card {
  max-width: 180px; /* optional cap while not fixed */
}

/* ============= PROFESSIONAL POLISH PACK (cards + layout) ============= */

/* ---- Global rhythm & readability tweaks ---- */
#article{
  font-size: 17px;               /* thoda bigger for readability */
  line-height: 1.78;
  letter-spacing: .1px;
  color: #0f172a;
}
#article p{ margin: .5rem 0 1.05rem; }

/* ---- Section headings more editorial ---- */
#article h2{
  font-weight: 700;
  border: 0;
  position: relative;
  margin-top: 1.8rem;
  padding-top: .25rem;
}
#article h2::after{
  content:"";
  display:block;
  height:2px;
  width:64px;
  margin:.45rem 0 0;
  background: linear-gradient(90deg,#3b82f6,rgba(59,130,246,0));
  border-radius:2px;
}
#article h3{
  font-weight: 650;
  color:#111827;
}

/* ---- Premium card surface (fallback blocks, side info, figures) ---- */
.card-like,
.tab-content,
.toc-card,
.author-row,
#article figure,
.figure-box{
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px;
  /*! box-shadow:
    0 1px 2px rgba(2,6,23,.04),
    0 8px 24px rgba(2,6,23,.06); */
}

/* subtle elevated header for card-like */
.card-like{
  padding: 1.1rem 1.15rem;
  backdrop-filter: saturate(160%) blur(2px);
}

/* section label inside card-like */
.sec-hd{
  font-size: .92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color:#334155;
  margin: 0 0 .6rem;
}

/* ---- Tabs: cleaner sheet look ---- */
#rightTabs .nav-link{
  border: 1px solid rgba(2,6,23,.08);
  border-bottom: 0;
  /*! background: #f8fafc; */
  color: #334155;
  font-weight: 600;
}
#rightTabs .nav-link:hover{ background:#f1f5f9; }
#rightTabs .nav-link.active{
  background:#fff;
  color:#0f172a;
  border-color: rgba(2,6,23,.08) rgba(2,6,23,.08) #fff rgba(2,6,23,.08);
}
.tab-content{
  border: 1px solid rgba(2,6,23,.08);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 1rem;
}

/* ---- TOC card: airy + focus marker ---- */
.toc-card{ padding-bottom:.25rem; }
.toc-card .toc-head{
  padding:.7rem .95rem;
  border-bottom: 1px solid rgba(2,6,23,.06);
  /*! background: linear-gradient(180deg,#ffffff 0%, #fafbff 100%); */
  border-radius:14px 14px 0 0;
}
.toc-card .toc-body{ padding:.6rem .8rem; }
#toc a{
  color:#475569;
  padding:.35rem .5rem .35rem .65rem;
  border-left: 3px solid transparent;
  border-radius: 8px;
}
#toc a:hover{
  color:#0f172a; background:#f8fafc; border-left-color:#c7d2fe;
}
#toc a.active{
  color:#0f172a; font-weight: 700;
  background: #eef2ff;
  border-left-color:#6366f1;
}

/* ---- Author chips: sleeker, tactile ---- */
.author-chip{
  /*! border: 1px solid rgba(2,6,23,.08); */
  /*! padding:.28rem .8rem; */
  /*! border-radius: 999px; */
  /*! background: linear-gradient(180deg,#fff, #fafafa); */
  transition: transform .15s ease, box-shadow .15s ease;
}
.author-chip:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2,6,23,.07);
}

/* ---- Badges: toned, editorial ---- */
.badge-sec{
  background:#eef2ff;
  color:#3730a3;
  border:1px solid #dee3ff;
  font-weight:700;
}
.badge-open{
  background:#ecfdf5;
  color:#065f46;
  border:1px solid #c9f5e3;
  font-weight:700;
}

/* ---- Details pane dl look (if you use dt/dd) ---- */
#dtl dl{ margin-bottom:0; }
#dtl dt{
  color:#64748b;
  font-weight:600;
}
#dtl dd{
  color:#0f172a;
}

/* ---- Figures & tables inside #article ---- */
#article table{
  border: 1px solid rgba(2,6,23,.08);
  border-radius: 10px;
  overflow: hidden;
}
#article th{
  background:#f8fafc;
  font-weight:700;
}

/* ---- Buttons refinement ---- */
.btn-outline-primary.btn-sm{
  border-color:#c7d2fe; color:#3730a3; font-weight:600;
}
.btn-outline-primary.btn-sm:hover{
  background:#eef2ff; color:#1e1b4b;
}
.btn-outline-secondary.btn-sm{
  border-color:#e5e7eb; color:#334155; font-weight:600;
}
.btn-outline-secondary.btn-sm:hover{
  background:#f3f4f6; color:#0f172a;
}

/* ---- Reader title spacing ---- */
.reader-title{
  margin-bottom: .35rem !important;
}

/* ---- Reference list center column ---- */
.article-refs h5{
  font-size: .95rem;
  font-weight: 800;
  color:#0f172a;
  margin: 0 0 .6rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 0;
}
.article-refs ol{ padding-left: 1.2rem; }
.article-refs li{ margin:.4rem 0; }

/* ---- Alerts more subtle ---- */
.alert.alert-warning.small{
  border-radius: 12px;
  border:1px solid rgba(251,191,36,.35);
  background: linear-gradient(180deg,#fff7ed,#fff);
  color:#92400e;
}

/* ---- Fine-tune grid gutters on large screens ---- */
@media (min-width:1200px){
  .container-lg .row.g-4{ --bs-gutter-x: 2rem; --bs-gutter-y: 1.5rem; }
}
/* ---- Related Articles Card ---- */
.related-card{
  background:#ffffff;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:14px;
  box-shadow:0 4px 20px rgba(2,6,23,0.06);
  overflow:hidden;
}
.related-card .related-header{
  /*! background:linear-gradient(90deg,#f8fafc 0%,#eef2ff 100%); */
  padding:.75rem 1rem;
  font-weight:700;
  font-size:.95rem;
  color:#1e293b;
  border-bottom:1px solid rgba(15,23,42,0.06);
  display:flex; align-items:center; gap:.4rem;
}
.related-card .related-body{
  padding:1rem 1.1rem;
}
.related-card .related-item a{
  color:#1e3a8a;
  transition:all .15s ease;
}
.related-card .related-item a:hover{
  color:#0f172a;
  text-decoration:underline;
}
.related-card .related-item:last-child{
  border-bottom:0;
  margin-bottom:0;
  padding-bottom:0;
}
/* Open-access license card (cleaner journal-style) */
.oa-notice {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: 1rem 1.25rem;
  color: #374151;
  font-size: .92rem;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.oa-note-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: .5rem;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.oa-note-body {
  color: #4b5563;
  font-family: "Georgia", serif;
}

/* Carousel (Hero) Styling - Uses same styles as before, adjusted for image frame */
.custom-journal-section {
    height: 450px; /* Fixed height for the carousel */
    background-color: #1c2436; 
    color: #f8f9fa; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem; 
}

.custom-journal-section .carousel-inner {
    height: 100%; 
}

.custom-journal-heading {
    font-size: 1.6rem !important; 
    font-weight: 700;
}

.custom-content-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.custom-small-font {
    font-size: 0.8rem; 
    color: #adb5bd !important;
}

.custom-underline-text-blue { /* You can remove this or keep if you use for specific titles */
    color: #4da6ff; 
}

.custom-underline-text-green { /* You can remove this or keep if you use for specific titles */
    color: #00e0b7; 
}

.custom-journal-btn-primary {
    background-color: #4da6ff;
    border-color: #4da6ff;
    color: #fff;
    font-size: 0.85rem; 
    border-radius: 4px;
    padding: 0.4rem 0.8rem; 
    font-weight: 500;
}

.custom-journal-link {
    color: #4da6ff;
    text-decoration: none;
    font-size: 0.85rem;
    align-self: center;
}

/* Updated for background-image */
.custom-journal-image-frame {
    border: 1px solid #343a40;
    background-color: #0d1117; /* Fallback if image doesn't load */
    border-radius: 8px;
    min-height: 350px; /* Adjust as needed */
    display: flex;
    align-items: flex-end; /* Text at the bottom of the image */
    justify-content: center;
    padding: 0; /* Remove internal padding if background-image covers */
    position: relative; /* For absolute positioned text */
}
.custom-journal-image-frame p {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}
        
/* Indicators Position */
.custom-indicators-position {
    bottom: unset;
    top: 50%; 
    transform: translateY(-50%);
    left: 20px; 
    margin: 0;
    justify-content: start;
    flex-direction: column; 
    height: 60px;
    z-index: 3;
}

.custom-indicators-position button {
    margin: 5px 0; 
    width: 8px; 
    height: 8px;
    border: 1px solid #ffffff; 
    border-radius: 50%;
}
/* ===== HERO CAROUSEL ===== */
  .hero-carousel { position: relative; }
  .hero-carousel .carousel-item { height: min(72vh, 720px); }
  @media (max-width: 767.98px){ .hero-carousel .carousel-item{ height: 60vh; } }

  .hero-slide-bg{
    position:absolute; inset:0;
    background-size: cover; background-position: center;
    transform: scale(1.02);
  }
  .hero-overlay{
    position:absolute; inset:0;
    background: radial-gradient(1200px 500px at 20% -20%, rgba(0,0,0,0.55), rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.15) 100%);
  }
  .hero-carousel .container{ position: relative; z-index: 2; }
  .hero-carousel h2 em{ font-style: italic; }
  .carousel-control-prev-icon, .carousel-control-next-icon{
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
  }
  .carousel-indicators [data-bs-target]{
    width:10px; height:10px; border-radius:50%;
    background-color:#fff; opacity:.55;
  }
  .carousel-indicators .active{ opacity:1; }

  /* ===== JOURNAL CARDS (full image visible) ===== */
  .journal-media { background:#fff; }
  .journal-cover-contain{
    width:100%; height:100%;
    object-fit: contain;             /* <-- no crop */
    object-position: center;
    image-rendering: auto;
    transition: transform .5s ease;
    display:block;
  }
  .journal-card:hover .journal-cover-contain{ transform: scale(1.02); }
  .journal-card .card-body{ padding: 1rem 1.1rem 1.1rem; }

  /* ===== ARTICLE CARDS ===== */
 /* Custom CSS for Article Cards */
.transition-300 {
    transition: all 0.3s ease-in-out;
}

.article-card {
    position: relative;
    border-radius: 0.75rem !important; 
}

.article-card:hover {
    transform: translateY(-3px); 
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important; 
}

.article-card:hover .article-title {
    color: var(--bs-primary) !important; 
    transition: color 0.3s ease;
}

.two-line {
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4; 
    max-height: 2.8em; 
}

.three-line {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stretched-link {
    z-index: 10; 
}

#journals {
    /* light background या कोई हल्का रंग */
    background-color: #f8f9fa; 
}

/* जर्नल कार्ड को होवर (Hover) पर ऊपर उठने का इफ़ेक्ट दें */
.journal-card:hover {
    transform: translateY(-5px); /* कार्ड को थोड़ा ऊपर उठाता है */
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; /* शैडो को गहरा करता है */
}

/* jouranl show case */
.journal-img-box {
    
    overflow: hidden; 
}


.journal-img-cover {
    height: 300px; 
    object-fit: contain;
    width: 100%;
    max-width: 200px;
    transition: transform 0.3s ease-in-out;
}


.journal-card:hover .journal-img-cover {
    transform: scale(1.05); 
}

/* जर्नल टाइटल पर होवर इफ़ेक्ट */
.hover-primary:hover {
    color: var(--bs-primary) !important; 
}


.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* --- Editorial Board Showcase CSS --- */

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    overflow-x: auto; /* हॉरिजॉन्टल स्क्रॉल सक्षम करें */
    -webkit-overflow-scrolling: touch; /* iOS पर बेहतर स्क्रॉलिंग */
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px; /* स्क्रॉल बार की ऊँचाई */
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc; /* स्क्रॉल हैंडल का रंग */
    border-radius: 4px;
}

/* Individual Member Card styling */
.member-card {
    width: 200px; /* कार्ड की निश्चित चौड़ाई */
    min-width: 200px;
    height: auto;
}

/* Avatar Style */
.eb-avatar-circle {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--bs-primary); /* आपके प्राथमिक रंग का उपयोग करें */
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto;
}

/* Affiliation clamping */
.clamp-2-aff {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em;
}

/* Hover effect */
.hover-shadow-lg:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Ensures card body takes full height for proper vertical alignment */
.member-card .card-body {
    min-height: 220px; /* 
}

.journal-badge-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 2.4em; /* 2 lines * line-height */
}