/* ═══════════════════════════════════════════════════════════════════════════
   Rising People Marshi 2026 — Master CSS Design System
   Theme: Black + Dark Blood Red | Mobile-First | Premium UI
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');

/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────────────────────── */
:root {
  /* Colors — Strictly Black and White */
  --clr-bg:          #ffffff;   /* Pure White */
  --clr-bg-2:        #f9f9f9;   /* Light Gray */
  --clr-bg-3:        #f2f2f2;   /* Slightly Darker Gray */
  --clr-card:        #ffffff;   /* White background for cards */
  --clr-border:      #000000;   /* Black border for high contrast */
  --clr-border-2:    #e5e5e5;   /* Light Gray border */

  --clr-primary:     #000000;   /* Pure Black */
  --clr-primary-d:   #000000;   /* Black */
  --clr-primary-l:   #333333;   /* Dark Gray */
  --clr-accent:      #000000;   /* Pure Black */
  --clr-gold:        #000000;   /* Replaced gold with black for B&W theme */
  --clr-gold-l:      #111111;

  --clr-text:        #000000;   /* Pure Black text */
  --clr-text-muted:  #444444;   /* Neutral Gray */
  --clr-text-dim:    #888888;   /* Faded Gray */

  /* Gradients — Monochrome */
  --grad-hero:       linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  --grad-primary:    linear-gradient(135deg, #000000, #333333);
  --grad-dark:       linear-gradient(180deg, #f9f9f9 0%, #ffffff 100%);
  --grad-card:       linear-gradient(145deg, #ffffff, #f9f9f9);
  --grad-gold:       linear-gradient(135deg, #000000, #444444);

  /* Typography — Premium Fluid Type */
  --font-heading:    'Playfair Display', Georgia, serif;
  --font-body:       'Inter', system-ui, sans-serif;
  --font-display:    'Oswald', Impact, sans-serif;

  /* Spacing Scale */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Border radius — Sharper corners for modern look */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-full: 9999px;

  /* Shadows — High-end subtle shadows */
  --shadow-sm:   0 2px 10px rgba(0,0,0,0.05);
  --shadow-md:   0 5px 25px rgba(0,0,0,0.1);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.15);
  --shadow-red:  0 5px 24px rgba(0,0,0,0.1);
  --shadow-gold: 0 5px 24px rgba(0,0,0,0.08);

  /* Transitions */
  --transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --transition-fast: 0.2s ease;

  /* Layout */
  --container-xl: 1320px;
  --container-lg: 1100px;
  --container-md: 850px;
  --header-h: 88px;
}

/* ─── RESPONSIVE UTILITIES ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sp-xl: 32px;
    --sp-2xl: 48px;
    --sp-3xl: 64px;
    --header-h: 72px;
  }
  .section { padding: var(--sp-2xl) 0; }
  .section--sm { padding: var(--sp-xl) 0; }
  .section--lg { padding: var(--sp-3xl) 0; }
}

.grid-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xl);
}

@media (max-width: 900px) {
  .grid-stack { grid-template-columns: 1fr; gap: var(--sp-lg); }
}

.grid-3-2-1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

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


/* ─── RESET & BASE ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--clr-gold); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--clr-primary); color: #fff; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--clr-text);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

h1 { font-size: clamp(2.2rem, 8vw, 3.8rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: clamp(1.3rem, 4vw, 1.9rem); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 600; }
h5 { font-size: 1.1rem;   font-weight: 600; }
h6 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

p { margin-bottom: var(--sp-md); color: var(--clr-text-muted); }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }

.section { padding: var(--sp-3xl) 0; }
.section--sm { padding: var(--sp-2xl) 0; }

/* ─── GRID ───────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--sp-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: var(--sp-2xl) 0; }
}
@media (max-width: 768px) {
  .container { padding: 0 var(--sp-lg); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--sp-md); }
  .section { padding: var(--sp-xl) 0; }
  .container { padding: 0 var(--sp-md); }
}

@media (max-width: 400px) {
  :root {
    --sp-xl: 32px;
    --sp-2xl: 48px;
    --sp-3xl: 64px;
  }
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  white-space: normal;
  text-align: center;
  max-width: 100%;
  text-decoration: none;
}

.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  color: #fff;
}

.btn--gold {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
}
.btn--gold:hover {
  background: #333333;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
}
.btn--outline:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--ghost {
  background: #f0f0f0;
  color: var(--clr-text);
  border: 1px solid var(--clr-border-2);
}
.btn--ghost:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* btn--dark — black button for B&W theme */
.btn--dark {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
}
.btn--dark:hover {
  background: #333333;
  border-color: #333333;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.btn--sm { padding: 8px 18px; font-size: 0.8rem; }
.btn--lg { padding: 16px 40px; font-size: 1rem; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.plan-card {
  background: #ffffff;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.plan-card--premium {
  border-color: #000;
}
.plan-card--premium:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.glass {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--clr-border-2) !important;
}

.card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card__image img {
  transform: scale(1.08);
}

.card__badge {
  position: absolute;
  top: var(--sp-sm);
  left: var(--sp-sm);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--grad-primary);
  color: #fff;
  z-index: 2;
}

.card__badge--gold {
  background: var(--grad-gold);
  color: #111;
}

.card__body {
  padding: var(--sp-lg);
}

.card__category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--clr-text);
  margin-bottom: var(--sp-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--clr-text);
  margin-bottom: var(--sp-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__excerpt {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  border-top: 1px solid var(--clr-border);
  padding-top: var(--sp-md);
  margin-top: var(--sp-md);
}

.card__author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-primary);
  flex-shrink: 0;
}

/* ─── FEATURED CARD ──────────────────────────────────────────────────────── */
.card--featured {
  grid-column: span 2;
}

.card--featured .card__image {
  aspect-ratio: 16/7;
}

.card--featured .card__title {
  font-size: 1.4rem;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

@media (max-width: 640px) {
  .card--featured { grid-column: span 1; }
  .card--featured .card__image { aspect-ratio: 16/9; }
}

/* ─── SECTION HEADERS ────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.section-header__left {
  position: relative;
  padding-left: var(--sp-md);
}

.section-header__left::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--clr-text);
  margin: 0;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin-top: 4px;
}

/* ─── BADGES & LABELS ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.badge--red    { background: #000000; color: #ffffff; border: 1px solid #000000; }
.badge--gold   { background: #000000; color: #ffffff; border: 1px solid #000000; }
.badge--dark   { background: #000000; color: #ffffff; border: 1px solid #000000; }
.badge--green  { background: #2e7d32; color: #ffffff; border: 1px solid #2e7d32; }
.badge--gray   { background: #eeeeee; color: #333333; border: 1px solid #cccccc; }

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-lg); }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.form-label .required { color: var(--clr-accent); margin-left: 2px; }

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--clr-text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--clr-text);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-control::placeholder { color: var(--clr-text-dim); }

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23888' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  margin-top: 6px;
}

.form-error {
  font-size: 0.78rem;
  color: #ff5555;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 500px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .btn { padding: 10px 20px; font-size: 0.85rem; width: 100%; justify-content: center; }
}

/* Fix for any potential overflow on extra small devices */
.overflow-hidden-mobile {
  @media (max-width: 480px) {
    overflow: hidden;
    max-width: 100vw;
  }
}

/* ─── ALERTS ─────────────────────────────────────────────────────────────── */
.alert {
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
  border-left: 4px solid transparent;
}

.alert--success {
  background: rgba(76,175,80,0.1);
  border-color: #4caf50;
  color: #81c784;
}

.alert--error {
  background: rgba(244,67,54,0.1);
  border-color: #f44336;
  color: #e57373;
}

.alert--info {
  background: rgba(33,150,243,0.1);
  border-color: #2196f3;
  color: #64b5f6;
}

.alert--warning {
  background: rgba(255,152,0,0.1);
  border-color: #ff9800;
  color: #ffb74d;
}

/* ─── CATEGORY PILLS ─────────────────────────────────────────────────────── */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--clr-border-2);
  background: transparent;
  color: var(--clr-text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.category-pill:hover,
.category-pill.active {
  background: #000;
  border-color: #000;
  color: #fff;
  transform: translateY(-1px);
}

/* ─── DIVIDERS ───────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--clr-border);
  opacity: 0.1;
  margin: var(--sp-xl) 0;
}

.divider--red {
  background: var(--clr-primary);
}

/* ─── UTILITIES ──────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-red    { color: var(--clr-accent); }
.text-gold   { color: var(--clr-gold); }
.text-muted  { color: var(--clr-text-muted); }
.text-dim    { color: var(--clr-text-dim); }

.font-heading  { font-family: var(--font-heading); }
.font-display  { font-family: var(--font-display); }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }

.d-flex  { display: flex; }
.d-grid  { display: grid; }
.d-none  { display: none; }
.d-block { display: block; }

.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }

.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }

.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }

.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }

.w-full   { width: 100%; }
.relative { position: relative; }
.hidden   { visibility: hidden; }

/* ─── RESPONSIVE TABLE ───────────────────────────────────────────────────── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--sp-lg);
  border-radius: var(--radius-md);
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal animation — default visible, JS enhances if available */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.hidden-pre-load {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

[data-reveal] {
  opacity: 0;
  transition: all 0.8s ease;
}
[data-reveal="visible"] {
  opacity: 1;
  transform: translateY(0);
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ─── SCROLLBAR ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--clr-bg-2); }
::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-accent); }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  padding: var(--sp-md) 0;
}

.breadcrumb a { color: var(--clr-text-muted); }
.breadcrumb a:hover { color: var(--clr-accent); }
.breadcrumb .sep { color: var(--clr-text-dim); }
.breadcrumb .current { color: var(--clr-accent); font-weight: 500; }

/* ─── PAGINATION ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--sp-xl) 0;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--clr-card);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
  padding: 0 12px;
}

.page-btn:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

.page-btn.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  font-weight: 700;
}

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

/* ─── SEARCH BAR ─────────────────────────────────────────────────────────── */
.search-bar {
  position: relative;
  max-width: 600px;
}

.search-bar__input {
  width: 100%;
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border-2);
  border-radius: var(--radius-full);
  padding: 12px 52px 12px 20px;
  color: var(--clr-text);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-bar__input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.search-bar__btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--clr-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-bar__btn:hover {
  background: var(--clr-accent);
  transform: translateY(-50%) scale(1.1);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 360px;
  overflow-y: auto;
  display: none;
}

.search-dropdown.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md);
  text-decoration: none;
  color: var(--clr-text);
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: #f5f5f5;
  color: var(--clr-text);
}

.search-result-thumb {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ─── TAGS ───────────────────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  background: #f5f5f5;
  border: 1px solid var(--clr-border-2);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* ─── READING PROGRESS BAR ──────────────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--grad-primary);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── BACK TO TOP ────────────────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: #000000;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 500;
  transition: all var(--transition);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  border: 2px solid #000;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ─── AVATAR ─────────────────────────────────────────────────────────────── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-primary);
  flex-shrink: 0;
}

.avatar--sm { width: 28px; height: 28px; }
.avatar--lg { width: 60px; height: 60px; border-width: 3px; }
.avatar--xl { width: 100px; height: 100px; border-width: 4px; }

.avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── PLAN CARDS ─────────────────────────────────────────────────────────── */
/* Defined above; these rules extend it */
.plan-card {
  text-align: center;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: #000000;
}

.plan-card:hover,
.plan-card.selected {
  border-color: #000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.plan-card--premium::before {
  background: #333333;
}

.plan-card--premium:hover,
.plan-card--premium.selected {
  border-color: #000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.plan-price {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--clr-accent);
  line-height: 1;
  margin: var(--sp-md) 0;
}

.plan-price sup { font-size: 1.2rem; vertical-align: super; }

.plan-features {
  list-style: none;
  text-align: left;
  margin: var(--sp-lg) 0;
}

.plan-features li {
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--clr-border);
}

.plan-features li:last-child { border: none; }

.plan-features li i { color: var(--clr-accent); width: 16px; flex-shrink: 0; }

/* ─── NEWSLETTER BOX ─────────────────────────────────────────────────────── */
.newsletter-box {
  background: #000000;
  border: 1px solid #000000;
  border-radius: var(--radius-xl);
  padding: var(--sp-3xl) var(--sp-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.newsletter-box h2 {
  color: #ffffff !important;
}

.newsletter-box p {
  color: rgba(255,255,255,0.7) !important;
}

.newsletter-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.newsletter-form {
  display: flex;
  gap: var(--sp-sm);
  max-width: 500px;
  margin: var(--sp-lg) auto 0;
}

.newsletter-form .form-control {
  flex: 1;
  border-radius: var(--radius-full);
  padding: 12px 20px;
}

@media (max-width: 500px) {
  .newsletter-form { flex-direction: column; }
}

/* ─── SOCIAL SHARE ───────────────────────────────────────────────────────── */
.social-share {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.share-btn--facebook  { background: #f0f0f0; color: #000; border-color: #00000015; }
.share-btn--twitter   { background: #f0f0f0; color: #000; border-color: #00000015; }
.share-btn--whatsapp  { background: #f0f0f0; color: #000; border-color: #00000015; }
.share-btn--linkedin  { background: #f0f0f0; color: #000; border-color: #00000015; }
.share-btn--copy      { background: #000; color: #fff; border-color: #000; }

.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* ─── LOADER OVERLAY ─────────────────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 50px;
  height: 50px;
  border: 4px solid var(--clr-border-2);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── RESPONSIVE UTILITIES ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE — Posts Grid + Content Layout + Sidebar
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── POSTS GRID ─────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

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

@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; gap: var(--sp-md); }
}

/* ─── CONTENT LAYOUT (main + sidebar) ───────────────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-xl);
  align-items: start;
}

@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .content-layout aside { display: none; }
}

/* ─── STICKY SIDEBAR ─────────────────────────────────────────────────────── */
.sticky-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

/* ─── WIDGET ─────────────────────────────────────────────────────────────── */
.widget {
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
}

.widget__title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-text);
  margin-bottom: var(--sp-md);
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
}

/* ─── POPULAR POSTS WIDGET ───────────────────────────────────────────────── */
.popular-post {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: 10px 0;
  border-bottom: 1px solid var(--clr-border-2);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.popular-post:last-child { border-bottom: none; }

.popular-post:hover { color: var(--clr-text); }

.popular-post__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-border-2);
  line-height: 1;
  min-width: 28px;
}

.popular-post__title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--clr-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.popular-post__date {
  font-size: 0.72rem;
  color: var(--clr-text-dim);
}

/* ─── CATEGORY STRIP ─────────────────────────────────────────────────────── */
.category-strip {
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
}

.category-strip::-webkit-scrollbar { display: none; }

.category-strip .container {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 12px var(--sp-md);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-strip .container::-webkit-scrollbar { display: none; }

/* ─── CARD HOVER BORDER ──────────────────────────────────────────────────── */
.card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--clr-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

/* ─── NEWSLETTER FORM (homepage) ─────────────────────────────────────────── */
.newsletter-box h2 { color: var(--clr-text); }
.newsletter-box p { color: var(--clr-text-muted); }

@media (max-width: 640px) {
  .newsletter-box { padding: var(--sp-xl) var(--sp-md); }
  .newsletter-form {
    flex-direction: column;
    gap: var(--sp-sm);
  }
  .newsletter-form .form-control,
  .newsletter-form .btn { width: 100%; }
}

/* ─── INDEX.PHP SECTIONS ─────────────────────────────────────────────────── */
/* Categories showcase section — give cards a white BG */
.section[style*="--clr-bg-2"] .card,
section[style*="grad-dark"] .card {
  background: var(--clr-card);
  color: var(--clr-text);
}

/* Plan section */
section[style*="grad-dark"] h3,
section[style*="grad-dark"] h2 { color: var(--clr-text); }

/* Featured people section text */
section .card h3[style*="#fff"],
section .card h3 { color: var(--clr-text) !important; }

/* Mobile print: make inline-styles overrideable */
@media (max-width: 768px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr !important; }
}
