/**
 * PARS Institutional Research Repository CSS
 * Professional, academic, human-designed interface styles.
 * Color Palette: Navy (#0f172a), Gold (#b45309 / #d97706), Slate (#64748b), Border (#e2e8f0)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
  --repo-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --repo-font-serif: 'Source Serif 4', Georgia, serif;
  
  --repo-bg: #f8fafc;
  --repo-surface: #ffffff;
  --repo-text-main: #0f172a;
  --repo-text-muted: #475569;
  --repo-text-subtle: #94a3b8;
  
  --repo-border: #e2e8f0;
  --repo-border-hover: #cbd5e1;
  
  --repo-primary: #0f172a;
  --repo-primary-light: #1e293b;
  
  --repo-gold: #b45309;
  --repo-gold-light: #fef3c7;
  --repo-gold-border: #fde68a;
  --repo-gold-hover: #92400e;
  
  --repo-heart-active: #dc2626;
  --repo-heart-bg: #fef2f2;
  
  --repo-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --repo-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --repo-shadow-hover: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  
  --repo-radius: 8px;
  --repo-radius-lg: 12px;
  --repo-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Page Layout */
.repository-page {
  background-color: var(--repo-bg);
  color: var(--repo-text-main);
  font-family: var(--repo-font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Institutional Hero */
.repo-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--repo-border);
  padding: 3.5rem 0 2.5rem;
}

.repo-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.repo-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--repo-text-muted);
  margin-bottom: 1rem;
}

.repo-breadcrumbs a {
  color: var(--repo-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.repo-breadcrumbs a:hover {
  color: var(--repo-text-main);
}

.repo-hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--repo-text-main);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.repo-hero__subtitle {
  font-size: 1.0625rem;
  color: var(--repo-text-muted);
  margin: 0 0 1.75rem;
  max-width: 680px;
  line-height: 1.5;
}

.repo-hero__stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--repo-border);
  font-size: 0.875rem;
  color: var(--repo-text-muted);
}

.repo-hero__stat-item strong {
  color: var(--repo-text-main);
  font-weight: 600;
}

/* Filter Controls Bar */
.repo-controls {
  background: var(--repo-surface);
  border-bottom: 1px solid var(--repo-border);
  position: sticky;
  top: 70px;
  z-index: 20;
  box-shadow: var(--repo-shadow-sm);
  padding: 1rem 0;
}

.repo-controls__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.repo-search-box {
  position: relative;
  flex: 1 1 320px;
  min-width: 240px;
}

.repo-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--repo-text-subtle);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.repo-search-input {
  width: 100%;
  height: 42px;
  padding: 0 1rem 0 2.5rem;
  font-family: var(--repo-font-sans);
  font-size: 0.875rem;
  color: var(--repo-text-main);
  background: #ffffff;
  border: 1px solid var(--repo-border);
  border-radius: var(--repo-radius);
  transition: var(--repo-transition);
}

.repo-search-input:focus {
  outline: none;
  border-color: var(--repo-primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.repo-filters-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.repo-select {
  height: 42px;
  padding: 0 2.25rem 0 0.875rem;
  font-family: var(--repo-font-sans);
  font-size: 0.875rem;
  color: var(--repo-text-main);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
  border: 1px solid var(--repo-border);
  border-radius: var(--repo-radius);
  cursor: pointer;
  appearance: none;
  transition: var(--repo-transition);
}

.repo-select:focus {
  outline: none;
  border-color: var(--repo-primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* Results Status Bar */
.repo-meta-bar {
  max-width: 1200px;
  margin: 1.5rem auto 1rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--repo-text-muted);
}

.repo-total-count {
  font-weight: 600;
  color: var(--repo-text-main);
}

/* Repository Grid */
.repo-grid {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

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

@media (max-width: 640px) {
  .repo-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .repo-grid {
    padding: 0 0.75rem;
    gap: 0.875rem;
  }
}

/* Institutional Repository Card */
.repository-card {
  background: var(--repo-surface);
  border: 1px solid var(--repo-border);
  border-radius: var(--repo-radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--repo-shadow-sm);
  transition: var(--repo-transition);
  position: relative;
  height: 100%;
}

.repository-card:hover {
  border-color: var(--repo-border-hover);
  box-shadow: var(--repo-shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--repo-gold);
  background: var(--repo-gold-light);
  border: 1px solid var(--repo-gold-border);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.submission-id-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--repo-text-muted);
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--repo-border);
}

/* ── SUPER ADMIN CARD CRUD CONTROLS ── */
.sub-card__admin-actions,
.card-admin-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.sub-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  line-height: 1;
}

.sub-admin-btn--edit {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
}
.sub-admin-btn--edit:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: #0F172A;
  transform: translateY(-1px);
}

.sub-admin-btn--delete {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}
.sub-admin-btn--delete:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

/* Save / Heart Button */
.save-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--repo-text-subtle);
  transition: var(--repo-transition);
}

.save-btn:hover {
  background: #f8fafc;
  color: var(--repo-heart-active);
  border-color: var(--repo-border);
}

.save-btn.liked {
  color: var(--repo-heart-active);
  background: var(--repo-heart-bg);
}

.save-btn.liked svg {
  fill: currentColor;
  transform: scale(1.1);
  animation: heartBurst 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBurst {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.1); }
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--repo-text-main);
  margin: 0 0 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.card-title a:hover {
  color: var(--repo-gold);
}

/* Academic Serif Abstract — hidden (description removed from cards) */
.card-abstract {
  display: none;
}


/* Card Divider */
.card-divider {
  border: 0;
  height: 1px;
  background: var(--repo-border);
  margin: 0 0 1rem;
}

/* Card Footer */
.card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.engagement-metrics {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--repo-text-muted);
  flex-wrap: wrap;
}

.metric-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.metric-item svg {
  width: 14px;
  height: 14px;
  color: var(--repo-text-subtle);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.btn-view-details {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--repo-text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--repo-radius);
  background: #f8fafc;
  border: 1px solid var(--repo-border);
  transition: var(--repo-transition);
}

.btn-view-details:hover {
  background: #f1f5f9;
  border-color: var(--repo-border-hover);
  color: var(--repo-text-main);
}

.btn-download-pdf {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--repo-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.45rem 0.875rem;
  border-radius: var(--repo-radius);
  border: 1px solid var(--repo-primary);
  transition: var(--repo-transition);
  cursor: pointer;
}

.btn-download-pdf:hover {
  background: var(--repo-primary-light);
  border-color: var(--repo-primary-light);
}

/* Skeleton Loading State */
.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--repo-border);
  border-radius: var(--repo-radius-lg);
  padding: 1.5rem;
  min-height: 280px;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.skeleton-line.w-25 { width: 25%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-line.h-title { height: 24px; margin-bottom: 1rem; }

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty & Error States */
.repo-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  background: #ffffff;
  border: 1px solid var(--repo-border);
  border-radius: var(--repo-radius-lg);
}

.repo-empty-state__icon {
  width: 48px;
  height: 48px;
  color: var(--repo-text-subtle);
  margin-bottom: 1rem;
}

.repo-empty-state__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--repo-text-main);
  margin-bottom: 0.375rem;
}

.repo-empty-state__text {
  font-size: 0.875rem;
  color: var(--repo-text-muted);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* Pagination Bar */
.repo-pagination {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.repo-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--repo-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--repo-text-main);
  background: #ffffff;
  border: 1px solid var(--repo-border);
  border-radius: var(--repo-radius);
  cursor: pointer;
  transition: var(--repo-transition);
}

.repo-page-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--repo-border-hover);
}

.repo-page-btn.active {
  background: var(--repo-primary);
  border-color: var(--repo-primary);
  color: #ffffff;
  font-weight: 600;
}

.repo-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Watermark & Download Progress Toast */
.watermark-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--repo-primary);
  color: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--repo-radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  z-index: 9999;
  font-size: 0.875rem;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.watermark-toast__icon {
  color: #f59e0b;
  flex-shrink: 0;
}

/* ============================================================
   INSTITUTIONAL FOOTER — 3-column clean grid
   ============================================================ */
.repo-footer {
  background: #0F1B2D;
  color: #cbd5e1;
  font-family: var(--repo-font-sans);
  margin-top: 4rem;
}

.repo-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .repo-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.repo-footer__brand {}

.repo-footer__logo-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.repo-footer__logo-img {
  height: 44px;
  width: auto;
  border-radius: 8px;
  display: block;
  background: #ffffff;
  padding: 4px 8px;
  object-fit: contain;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.repo-footer__tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 0.75rem;
}

.repo-footer__privacy-note {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
}

.repo-footer__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #D4AF37;
  margin: 0 0 1rem;
}

.repo-footer__link-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.repo-footer__link-list li a,
.repo-footer__link-list li span {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}

.repo-footer__link-list li a:hover {
  color: #D4AF37;
}

.repo-footer__legal-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.repo-footer__legal-links a {
  font-size: 0.75rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.repo-footer__legal-links a:hover {
  color: #D4AF37;
}

.repo-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: #475569;
}

.repo-footer__bottom p {
  margin: 0;
}

/* ============================================================
   ADMIN CONTROLS — status bar button + card overlays
   ============================================================ */
.admin-panel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--repo-font-sans);
  color: #0f172a;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--repo-transition);
}

.admin-panel-btn:hover {
  background: #fde68a;
  border-color: #D4AF37;
}

/* Per-card admin overlay */
.card-admin-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid #fde68a;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.7375rem;
  font-weight: 600;
  font-family: var(--repo-font-sans);
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--repo-transition);
  white-space: nowrap;
}

.admin-btn--publish {
  color: #065f46;
  background: #d1fae5;
  border-color: #6ee7b7;
}
.admin-btn--publish:hover { background: #a7f3d0; }

.admin-btn--hide {
  color: #7c3aed;
  background: #ede9fe;
  border-color: #c4b5fd;
}
.admin-btn--hide:hover { background: #ddd6fe; }

.admin-btn--feature {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}
.admin-btn--feature:hover { background: #fde68a; }

.admin-btn--edit {
  color: #1e40af;
  background: #dbeafe;
  border-color: #93c5fd;
}
.admin-btn--edit:hover { background: #bfdbfe; }

.admin-btn--delete {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}
.admin-btn--delete:hover { background: #fecaca; }

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Delete-comment button inside comment items */
.btn-delete-comment {
  background: none;
  border: none;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  font-family: var(--repo-font-sans);
}
.btn-delete-comment:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================================ */

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {
  /* Hero */
  .repo-hero {
    padding: 2rem 0 1.5rem;
  }

  .repo-hero__title {
    font-size: 1.6rem;
  }

  .repo-hero__subtitle {
    font-size: 0.9375rem;
  }

  /* Controls bar: stack search + filters */
  .repo-controls__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
  }

  .repo-search-box {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .repo-filters-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .repo-select {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 120px;
  }

  /* Meta bar */
  .repo-meta-bar {
    margin: 1rem auto 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Card padding */
  .repository-card {
    padding: 1.25rem;
  }
}

/* ── Mobile Phone (≤ 480px) ── */
@media (max-width: 480px) {
  /* Hero */
  .repo-hero {
    padding: 1.5rem 0 1rem;
  }

  .repo-hero__title {
    font-size: 1.375rem;
  }

  .repo-hero__inner {
    padding: 0 1rem;
  }

  /* Controls */
  .repo-controls {
    top: 60px; /* account for smaller mobile header */
    padding: 0.75rem 0;
  }

  .repo-controls__inner {
    padding: 0 1rem;
  }

  .repo-select {
    flex: 1 1 100%;
    height: 40px;
  }

  .repo-search-input {
    height: 40px;
    font-size: 0.8125rem;
  }

  /* Card */
  .repository-card {
    padding: 1rem;
    border-radius: 10px;
  }

  .card-title {
    font-size: 1rem;
    margin-bottom: 0.625rem;
  }

  /* Engagement metrics: allow wrapping, reduce gap */
  .engagement-metrics {
    gap: 0.625rem;
    flex-wrap: wrap;
  }

  .metric-item {
    font-size: 0.7rem;
  }

  /* Pagination */
  .repo-pagination {
    gap: 0.25rem;
    padding: 0 0.75rem;
    flex-wrap: wrap;
  }

  .repo-page-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.8125rem;
    padding: 0 0.5rem;
  }
}

/* ── Very small phones (≤ 360px) ── */
@media (max-width: 360px) {
  .repo-hero__title {
    font-size: 1.2rem;
  }

  .repository-card {
    padding: 0.875rem;
  }

  .category-badge,
  .submission-id-badge {
    font-size: 0.625rem;
  }

  .engagement-metrics {
    gap: 0.5rem;
  }
}
