/* ═══════════════════════════════════════
   PORE Components — style.css
   ═══════════════════════════════════════ */
@import url('./base.css');

/* ── Buttons ── */
.p-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.4rem; font-family: var(--pore-font-ui);
  font-size: .875rem; font-weight: 600;
  background: var(--pore-green); color: #fff;
  border: 1px solid var(--pore-green);
  border-radius: var(--pore-radius); text-decoration: none;
  transition: background .18s, transform .12s; cursor: pointer;
}
.p-btn:hover { background: var(--pore-green-deep); color: #fff; transform: translateY(-1px); }

.p-btn-ghost {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.4rem; font-family: var(--pore-font-ui);
  font-size: .875rem; font-weight: 600;
  background: transparent; color: var(--pore-green);
  border: 1px solid var(--pore-green);
  border-radius: var(--pore-radius); text-decoration: none;
  transition: background .18s, color .18s; cursor: pointer;
}
.p-btn-ghost:hover { background: var(--pore-green); color: #fff; }

.p-btn-sm { padding: .4rem 1rem; font-size: .8rem; }

/* ── Navbar ── */
.p-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(250,248,243,.97); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--pore-rule); padding: 0;
}
.p-nav__inner {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: 1200px; margin: 0 auto; padding: .7rem 2rem;
}
.p-nav__brand {
  font-family: var(--pore-font-display); font-size: 1.5rem;
  font-weight: 700; color: var(--pore-ink); text-decoration: none;
  letter-spacing: -.02em; white-space: nowrap;
}
.p-nav__brand:hover { color: var(--pore-green); }
.p-nav__brand small {
  display: block; font-family: var(--pore-font-ui);
  font-size: .55rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--pore-green);
  line-height: 1;
}
.p-nav__links {
  display: flex; gap: .25rem; list-style: none;
  margin: 0 auto 0 1rem; padding: 0;
}
.p-nav__link {
  font-size: .82rem; font-weight: 500; color: var(--pore-ink-muted);
  padding: .4rem .75rem; border-radius: var(--pore-radius);
  text-decoration: none; transition: background .15s, color .15s;
}
.p-nav__link:hover { background: var(--pore-green-light); color: var(--pore-green); }
.p-nav__link--active { background: var(--pore-green-light); color: var(--pore-green); font-weight: 600; }

.p-nav__auth { display: flex; gap: .5rem; align-items: center; }

.p-nav__toggle {
  display: none; background: none; border: 1px solid var(--pore-rule);
  border-radius: var(--pore-radius); padding: .35rem .6rem;
  font-size: 1.1rem; color: var(--pore-ink); cursor: pointer;
}

@media (max-width: 768px) {
  .p-nav__inner { padding: .6rem 1.25rem; flex-wrap: wrap; }
  .p-nav__toggle { display: block; margin-left: auto; }
  .p-nav__links {
    display: none; flex-direction: column; width: 100%;
    gap: 0; padding-top: .5rem; border-top: 1px solid var(--pore-rule);
    margin: .5rem 0 0;
  }
  .p-nav__links.active { display: flex; }
  .p-nav__auth { display: none; width: 100%; justify-content: flex-start; gap: .5rem; padding-top: .4rem; }
  .p-nav__links.active ~ .p-nav__auth { display: flex; }
}

/* ── Masthead / Hero ── */
.p-masthead {
  background: var(--pore-parchment);
  background-image: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(45,80,22,.05) 0%, transparent 70%);
  padding: 4rem 0; text-align: center;
  border-bottom: 1px solid var(--pore-rule);
}
.p-masthead--compact { padding: 2.5rem 0; }
.p-masthead h1 { font-family: var(--pore-font-display); font-size: 2.75rem; margin-bottom: .5rem; }
.p-masthead .p-tagline { margin-bottom: 1.5rem; }

/* ── Shloka Block ── */
.p-shloka {
  border-left: 3px solid var(--pore-ochre);
  padding: 1.25rem 1.5rem; margin: 1.5rem auto;
  max-width: 600px; text-align: left;
  background: var(--pore-warm); border-radius: 0 var(--pore-radius) var(--pore-radius) 0;
}
.p-shloka__sanskrit {
  font-family: var(--pore-font-devanagari);
  font-size: 1.15rem; color: var(--pore-ochre); line-height: 1.7; margin-bottom: .5rem;
}
.p-shloka__translit {
  font-family: var(--pore-font-display); font-style: italic;
  font-size: .95rem; color: var(--pore-ink-muted); margin-bottom: .5rem;
}
.p-shloka__translation {
  font-family: var(--pore-font-ui); font-size: .85rem;
  color: var(--pore-ink-muted); line-height: 1.5;
}

/* ── Search Bar ── */
.p-search-bar {
  max-width: 680px; margin: 0 auto; position: relative;
}
.p-search-bar input[type="text"] {
  width: 100%; padding: .85rem 3rem .85rem 1.1rem;
  font-family: var(--pore-font-ui); font-size: 1rem;
  border: 2px solid var(--pore-rule); border-radius: var(--pore-radius);
  background: var(--pore-surface-card); color: var(--pore-ink);
  transition: border-color .2s;
}
.p-search-bar input[type="text"]::placeholder {
  font-family: var(--pore-font-display); color: var(--pore-sand);
  font-style: italic;
}
.p-search-bar input[type="text"]:focus {
  outline: none; border-color: var(--pore-green);
  box-shadow: 0 0 0 3px rgba(45,80,22,.08);
}
.p-search-bar__icon {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--pore-green-mid); font-size: 1rem; pointer-events: none;
}

/* ── Result Card ── */
.p-result-card {
  background: var(--pore-surface-card);
  border: 1px solid var(--pore-rule); border-left: 3px solid var(--pore-green);
  border-radius: var(--pore-radius); padding: 1.25rem 1.5rem;
  transition: box-shadow .2s;
}
.p-result-card:hover { box-shadow: var(--pore-shadow-hover); }
.p-result-card__title {
  font-family: var(--pore-font-display); font-size: 1.1rem;
  font-weight: 600; color: var(--pore-ink); margin-bottom: .35rem;
  line-height: 1.35;
}
.p-result-card__title a { color: var(--pore-ink); text-decoration: none; }
.p-result-card__title a:hover { color: var(--pore-green); }
.p-result-card__meta {
  font-size: .8rem; color: var(--pore-ink-muted); margin-bottom: .5rem;
  display: flex; flex-wrap: wrap; gap: .25rem .75rem;
}
.p-result-card__doi {
  font-family: var(--pore-font-mono); font-size: .78rem; color: var(--pore-green-mid);
}
.p-result-card__abstract {
  font-size: .9rem; color: var(--pore-ink-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: .6rem;
}
.p-result-card__abstract.expanded {
  -webkit-line-clamp: unset; overflow: visible;
}
.p-result-card__expand {
  background: none; border: none; color: var(--pore-green-mid);
  font-size: .8rem; font-weight: 500; padding: 0; cursor: pointer;
}
.p-result-card__expand:hover { color: var(--pore-green); }
.p-result-card__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.p-result-card__actions { display: flex; gap: .5rem; margin-top: .75rem; align-items: center; }

/* ── Tags ── */
.p-tag {
  display: inline-block; padding: .15rem .55rem;
  background: var(--pore-green-light); color: var(--pore-green);
  font-size: .72rem; font-weight: 500; border-radius: var(--pore-radius);
}

/* ── Collection / Theme Tiles ── */
.p-collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.p-collection-tile {
  background: var(--pore-surface-card); border: 1px solid var(--pore-rule);
  border-top: 4px solid var(--pore-green); border-radius: 0 0 var(--pore-radius) var(--pore-radius);
  padding: 1.5rem; text-align: center; text-decoration: none;
  transition: box-shadow .2s, transform .15s; display: block;
}
.p-collection-tile:hover { box-shadow: var(--pore-shadow-hover); transform: translateY(-3px); }
.p-collection-tile__glyph {
  font-size: 1.6rem; color: var(--pore-ochre); margin-bottom: .6rem; display: block;
}
.p-collection-tile__title {
  font-family: var(--pore-font-display); font-size: 1.05rem;
  font-weight: 600; color: var(--pore-ink); margin-bottom: .35rem;
}
.p-collection-tile__count {
  font-size: .78rem; color: var(--pore-ink-muted);
}

/* ── Stats Bar ── */
.p-stats-bar {
  display: flex; justify-content: center; gap: 3rem;
  padding: 1.25rem 0; border-top: 1px solid var(--pore-rule);
  border-bottom: 1px solid var(--pore-rule); background: var(--pore-surface);
}
.p-stat { text-align: center; }
.p-stat__num {
  font-family: var(--pore-font-display); font-size: 1.75rem;
  font-weight: 700; color: var(--pore-green); display: block;
}
.p-stat__label {
  font-size: .7rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--pore-ink-muted);
}

/* ── Callout Boxes ── */
.p-note {
  border-left: 3px solid var(--pore-ochre); background: var(--pore-warm);
  padding: 1rem 1.25rem; border-radius: 0 var(--pore-radius) var(--pore-radius) 0;
  margin: 1rem 0; font-size: .9rem;
}
.p-alert {
  border-left: 3px solid var(--pore-green); background: var(--pore-green-light);
  padding: 1rem 1.25rem; border-radius: 0 var(--pore-radius) var(--pore-radius) 0;
  margin: 1rem 0; font-size: .9rem;
}
.p-info {
  background: var(--pore-warm); border: 1px solid var(--pore-rule);
  padding: 1rem 1.25rem; border-radius: var(--pore-radius);
  margin: 1rem 0; font-size: .9rem;
}

/* ── Pagination ── */
.p-pagination {
  display: flex; justify-content: center; gap: .4rem;
  margin: 2rem 0; flex-wrap: wrap;
}
.p-pagination a, .p-pagination span {
  padding: .45rem .85rem; font-size: .85rem; font-weight: 500;
  border: 1px solid var(--pore-rule); border-radius: var(--pore-radius);
  color: var(--pore-ink-muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.p-pagination a:hover { background: var(--pore-green-light); color: var(--pore-green); }
.p-pagination .active {
  background: var(--pore-green); color: #fff; border-color: var(--pore-green);
}
.p-pagination .disabled { opacity: .4; pointer-events: none; }

/* ── Section Header ── */
.p-section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.5rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--pore-rule);
}
.p-section-header h2 { margin: 0; }
.p-section-header a {
  font-size: .82rem; font-weight: 600; color: var(--pore-green-mid);
}
.p-section-header a:hover { color: var(--pore-green); }

/* ── Form Controls ── */
.p-form-group { margin-bottom: 1rem; }
.p-form-label {
  display: block; font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--pore-ink-muted); margin-bottom: .35rem;
}
.p-form-input, .p-form-select {
  width: 100%; padding: .6rem .85rem;
  font-family: var(--pore-font-ui); font-size: .9rem;
  border: 1px solid var(--pore-rule); border-radius: var(--pore-radius);
  background: var(--pore-surface-card); color: var(--pore-ink);
  transition: border-color .2s;
}
.p-form-input:focus, .p-form-select:focus {
  outline: none; border-color: var(--pore-green);
  box-shadow: 0 0 0 3px rgba(45,80,22,.08);
}

/* ── Filter Chips ── */
.p-filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.p-filter-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem; background: var(--pore-green-light);
  color: var(--pore-green); font-size: .75rem; font-weight: 500;
  border-radius: var(--pore-radius); border: none;
}
.p-filter-chip button {
  background: none; border: none; color: var(--pore-green);
  font-size: .85rem; padding: 0; line-height: 1; cursor: pointer;
}

/* ── Desktop Footer ── */
.p-footer {
  background: var(--pore-parchment); color: var(--pore-ink);
  border-top: 1px solid var(--pore-rule); padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.p-footer__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}
.p-footer__heading {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pore-green);
  margin-bottom: .75rem;
}
.p-footer ul { list-style: none; padding: 0; }
.p-footer li { margin-bottom: .4rem; }
.p-footer a { color: var(--pore-ink-muted); font-size: .85rem; }
.p-footer a:hover { color: var(--pore-green); }

.p-footer__bottom {
  border-top: 1px solid var(--pore-rule); margin-top: 2rem;
  padding-top: 1.25rem; text-align: center;
  font-size: .8rem; color: var(--pore-ink-faint);
  max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 2rem; padding-right: 2rem;
}
.p-footer__bottom a { color: var(--pore-green-mid); }

@media (max-width: 768px) {
  .p-footer { display: none; }
}

/* ── Mobile Footer ── */
.p-mobile-footer {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1050; background: var(--pore-parchment);
  border-top: 1px solid var(--pore-rule); height: 60px;
  align-items: stretch;
}
.p-mobile-footer a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--pore-ink-muted); text-decoration: none;
  font-size: 9px; font-weight: 600; letter-spacing: .03em;
  transition: color .15s;
}
.p-mobile-footer a i { font-size: 17px; }
.p-mobile-footer a:hover { color: var(--pore-green); }
.p-mobile-footer a:last-child { color: var(--pore-ink); }
.p-mobile-footer a:last-child i { color: var(--pore-green); }

@media (max-width: 767px) {
  .p-mobile-footer { display: flex; }
}

/* ── Offcanvas Drawer ── */
#poorvamOffcanvas {
  position: fixed; top: 100%; left: 0; right: 0; z-index: 1045;
  display: flex; flex-direction: column;
  background: var(--pore-parchment); color: var(--pore-ink);
  border-top: 1px solid var(--pore-rule);
  height: 70vh !important; max-height: 70vh !important;
  transition: transform .3s ease-in-out;
  visibility: hidden;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
}
#poorvamOffcanvas.show {
  transform: translateY(-100%); visibility: visible;
}
.offcanvas-backdrop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1040;
  width: 100vw; height: 100vh; background-color: rgba(0,0,0,.6);
  opacity: 0; transition: opacity .3s ease-in-out;
  pointer-events: none;
}
.offcanvas-backdrop.show { opacity: 1; pointer-events: auto; }

.offcanvas-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--pore-rule); padding: 1rem 1.25rem .75rem;
}
.offcanvas-title {
  font-weight: 700; font-size: .85rem; color: var(--pore-green);
  letter-spacing: .08em; text-transform: uppercase;
}
.btn-close {
  box-sizing: content-box; width: 1em; height: 1em; padding: .25em;
  color: var(--pore-ink); border: 0; border-radius: .25rem; opacity: .5; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
}
.btn-close:hover { opacity: .8; }
.offcanvas-body { padding: 1.25rem; overflow-y: auto; flex-grow: 1; }

.drawer-section { margin-bottom: 1.2rem; }
.drawer-section-title {
  font-size: .6rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pore-green); margin: 0 0 .5rem;
}
.drawer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.drawer-links.single-col { grid-template-columns: 1fr; }
.drawer-links a {
  display: flex; align-items: center; gap: 7px;
  color: var(--pore-ink-muted); text-decoration: none;
  font-size: 13px; padding: 8px 10px; border-radius: var(--pore-radius);
  background: var(--pore-warm); border: 1px solid var(--pore-rule);
  transition: background .15s, color .15s;
}
.drawer-links a i { color: var(--pore-green); font-size: 12px; width: 14px; text-align: center; }
.drawer-links a:hover { background: var(--pore-green-light); color: var(--pore-green); }

.social-row { display: flex; gap: 8px; margin-top: .5rem; }
.social-row a {
  width: 36px; height: 36px; border-radius: var(--pore-radius);
  background: var(--pore-warm); border: 1px solid var(--pore-rule);
  display: flex; align-items: center; justify-content: center;
  color: var(--pore-ink-muted); font-size: 14px; text-decoration: none;
  transition: background .15s, color .15s;
}
.social-row a:hover { background: var(--pore-green); color: #fff; }

.email-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pore-warm); border: 1px solid var(--pore-rule);
  border-radius: var(--pore-radius); padding: 6px 10px;
  color: var(--pore-ink-muted); font-size: .75rem;
}
.email-pill i { color: var(--pore-green); font-size: 12px; }

.drawer-copyright {
  font-size: .65rem; color: var(--pore-ink-faint); text-align: center;
  margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--pore-rule);
}
.drawer-copyright a { color: var(--pore-green-mid); text-decoration: none; }

/* ── Content sections ── */
.p-section { padding: 3rem 0; }
.p-section + .p-section { border-top: 1px solid var(--pore-rule); }

/* ── Results list ── */
.p-results-list { display: flex; flex-direction: column; gap: 1rem; }

/* ── Author / Profile card ── */
.p-profile-card {
  background: var(--pore-surface-card); border: 1px solid var(--pore-rule);
  border-radius: var(--pore-radius); padding: 1.5rem; text-align: center;
  transition: box-shadow .2s;
}
.p-profile-card:hover { box-shadow: var(--pore-shadow-hover); }
.p-profile-card__avatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; margin: 0 auto .75rem;
  border: 3px solid var(--pore-warm);
}
.p-profile-card__name {
  font-family: var(--pore-font-display); font-size: 1.05rem;
  font-weight: 600; color: var(--pore-ink);
}
.p-profile-card__detail { font-size: .8rem; color: var(--pore-ink-muted); }