/* ===== PRAKASH KNOWLEDGE HUB - Custom Styles ===== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #6D28D9;
  --primary-dark: #5B21B6;
  --primary-light: #7C3AED;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --bg: #FFFFFF;
  --bg-section: #F8FAFC;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.dark {
  --bg: #0F0F0F;
  --bg-section: #1A1A2E;
  --text: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-light: #6B7280;
  --border: #374151;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
  --card-shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.5), 0 10px 10px -5px rgba(0,0,0,0.3);
}

/* ===== BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.3;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-section);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 100px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 100% { background-position: 1000px 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-border { 0%, 100% { border-color: var(--primary); } 50% { border-color: var(--accent); } }

/* Intersection Observer animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  
  &.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in { animation: fadeIn 0.6s ease forwards; }
.animate-slide-up { animation: slideUp 0.6s ease forwards; }

/* ===== HEADER ===== */
#main-header {
  position: fixed;
  inset: 0 0 auto 0; /* Modern shorthand for top/left/right */
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;

  &.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, var(--header-shadow, 0.1));
  }
}
.dark #main-header { --header-shadow: 0.4; }

/* ===== LOGO ===== */
.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== NAVIGATION ===== */
.nav-link {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;

  &:hover {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
  }

  &.active {
    color: var(--primary);

    &::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 50%;
      transform: translateX(-50%);
      width: 20px;
      height: 2px;
      background: var(--primary);
      border-radius: 1px;
    }
  }
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;

  &.open {
    opacity: 1;
    pointer-events: all;

    #mobile-menu-panel {
      transform: translateX(0);
    }
  }
}

#mobile-menu-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(280px, 100vw);
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100dvh; /* Dynamic viewport height protects mobile layout */
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0F0A1E 0%, #1a0845 50%, #2D1B69 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(109, 40, 217, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(124, 58, 237, 0.2) 0%, transparent 40%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(109, 40, 217, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 40, 217, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(109, 40, 217, 0.2);
  border: 1px solid rgba(109, 40, 217, 0.4);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #C4B5FD;
  
  .dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: float 2s ease infinite;
  }
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.25rem, 6vw + 1rem, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: white;

  .accent {
    background: linear-gradient(135deg, #F59E0B, #FCD34D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
  max-width: 600px;
  line-height: 1.8;
}

/* ===== BUTTONS ===== */
.btn-base {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  
  &:hover {
    transform: translateY(-2px);
  }
}

.btn-primary {
  @extend .btn-base;
  background: linear-gradient(135deg, #6D28D9, #5B21B6);
  color: white;
  box-shadow: 0 4px 15px rgba(109, 40, 217, 0.4);

  &:hover {
    box-shadow: 0 8px 25px rgba(109, 40, 217, 0.5);
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
  }
}

.btn-secondary {
  @extend .btn-base;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);

  &:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

.btn-outline {
  @extend .btn-base;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 10px;

  &:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
  }
}

/* ===== CARDS ===== */
.card-base {
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
}

.article-card {
  @extend .card-base;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;

  &:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);

    .card-image {
      transform: scale(1.04);
    }
  }

  .card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.4s ease;
  }
}

.featured-card {
  @extend .card-base;
  border-radius: 20px;
  overflow: hidden;

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  }
}

/* ===== CATEGORY BADGE ===== */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

/* ===== TOPIC CARDS ===== */
.topic-card {
  @extend .card-base;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: block;

  &:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(109, 40, 217, 0.15);
    border-color: var(--primary);

    .topic-icon {
      animation: none;
      transform: scale(1.15);
    }
  }

  .topic-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    animation: float 3s ease infinite;
    animation-delay: var(--delay, 0s);
    transition: transform 0.3s ease;
  }
}

/* ===== POPULAR READS ===== */
.popular-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--bg-section);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);

  &:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    transform: translateX(4px);

    .popular-number { opacity: 1; }
  }

  .popular-number {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.3;
    min-width: 40px;
    line-height: 1;
    transition: opacity 0.2s;
  }
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  padding: 4px 16px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.section-description {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== GRADIENT CARD ===== */
.gradient-card {
  background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 50%, #7C3AED 100%);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(245, 158, 11, 0.2) 0%, transparent 60%);
  }

  &::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
  }
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}
.dark .glass {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===== SEARCH ===== */
.search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;

  &:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent);
  }
}

/* ===== STATS ===== */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;

  &:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    color: var(--primary);
  }
}

/* ===== READING PROGRESS BAR ===== */
#reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ===== TABLE OF CONTENTS ===== */
.toc-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;

  &:hover, &.active {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-left-color: var(--primary);
  }
}

/* ===== ARTICLE CONTENT ===== */
.article-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text);

  h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 700;}
  h3 { font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.75rem; font-weight: 600;}
  p { margin-bottom: 1.5rem; }
  strong { font-weight: 700; }
  ul, ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
  li { margin-bottom: 0.5rem; }

  blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;
  }

  code {
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  }
}

/* ===== FOOTER ===== */
footer {
  background: #0F0A1E;
  color: rgba(255, 255, 255, 0.8);
}

.footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;

  &:hover { color: #C4B5FD; }
}

.footer-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1rem;

  &:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
  }
}

/* ===== NEWSLETTER ===== */
.newsletter-form {
  display: flex;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px 0 0 8px;
  color: white;
  outline: none;

  &::placeholder { color: rgba(255, 255, 255, 0.5); }
  &:focus { border-color: rgba(245, 158, 11, 0.5); }
}

.newsletter-btn {
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;

  &:hover { background: var(--accent-dark); }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-section) 25%, rgba(229, 231, 235, 0.5) 50%, var(--bg-section) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

/* ===== ABOUT PAGE ===== */
.expertise-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 100px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;

  &:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
  }
}

/* ===== PI NETWORK CARD ===== */
.pi-card {
  background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 100%);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(109, 40, 217, 0.4);

  &::before {
    content: 'π';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 10rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
  }
}

.pi-code {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 0.75rem 2rem;
  animation: pulse-border 2s ease infinite;
}

/* ===== SCROLL TO TOP ===== */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(109, 40, 217, 0.4);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 900;

  &.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  &:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(109, 40, 217, 0.5);
  }
}

/* ===== DARK MODE OVERRIDES ===== */
.dark {
  .article-card, .featured-card, .topic-card {
    background: #1a1a2e;
    border-color: rgba(55, 65, 81, 0.5);
  }
  .popular-item { background: rgba(55, 65, 81, 0.3); }
  .tag { background: rgba(55, 65, 81, 0.5); }
}

/* ===== SHARE BUTTONS ===== */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;

  &:hover { transform: translateY(-2px); opacity: 0.9; }
}

.share-twitter { background: #1DA1F2; color: white; }
.share-linkedin { background: #0A66C2; color: white; }
.share-copy { background: var(--bg-section); color: var(--text); border: 1px solid var(--border); }

/* ===== UTILITIES & BREADCRUMBS ===== */
.container-narrow {
  max-width: 740px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);

  a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    &:hover { color: var(--primary); }
  }

  &-sep { color: var(--border); }
}

/* ===== AUTHOR CARD ===== */
.author-card {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  object-fit: cover;
}

/* ===== LOADING & PAGINATION ===== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;

  &:hover, &.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
  }
}

/* ===== RESPONSIVE UTILITIES (MEDIA QUERIES) ===== */
@media (max-width: 768px) {
  .gradient-card, .pi-card { padding: 2rem 1.5rem; }
  .section-header { margin-bottom: 2rem; }
}

@media (max-width: 480px) {
  .btn-primary, .btn-secondary, .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  #main-header, #scroll-top, .share-btn, .gradient-card { display: none; }
  body { color: #000; background: #fff; }
}
