/*
Theme Name: PrepNotes Pro
Theme URI: https://tejanaschool.example/prepnotes-pro
Author: Tejana School
Author URI: https://tejanaschool.example
Description: An advanced, education-focused WordPress theme built for competitive-exam note & content platforms (RPSC, REET, Police, Patwari, and more). Features a custom Notes post type with Exam Category, Grade/Level and Subject taxonomies, live-filterable archives, reading-progress single note pages with auto table of contents, a full drag-and-drop Customizer for the homepage, footer widget areas, and a fully responsive Bootstrap 5 layout.
Version: 1.0.11
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prepnotes
Tags: education, blog, custom-post-type, custom-menu, custom-colors, featured-images, footer-widgets, full-width-template, threaded-comments, translation-ready, one-column, two-columns, right-sidebar

PrepNotes Pro was adapted from a bespoke HTML/CSS design into a full WordPress theme.
All original design classes and structure below are preserved so front-end markup
generated by PHP templates renders pixel-identical to the source design.
*/

/* ============================================================
   THEME NOTE: everything below this line is the design stylesheet,
   ported so every template in this theme (front-page, taxonomy
   archives, single note, legal pages) renders using the same classes.
   Synced from the latest home.html / style.css design pass.
   ============================================================ */

/* ============================================================
   PrepNotes — FINAL COMPLETE STYLESHEET
   Pages: home.html, all-categories.html, category.html,
          post.html, privacy.html
   Last updated: Feb 2026
   ============================================================ */

/* ============================================================
   1. ROOT VARIABLES
   ============================================================ */
:root {
  /* Brand — Orange */
  --orange: #F26522;
  --orange-dark: #D9541A;
  --orange-light: #FF8A5C;
  --orange-soft: #FFF4EE;
  --orange-soft-2: #FEF1EB;

  /* Blue */
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #60A5FA;
  --blue-soft: #EBF2FF;
  --blue-soft-2: #F5F9FF;
  --blue-border: #DBEAFE;

  /* Purple */
  --purple: #9333EA;
  --purple-dark: #7E22CE;
  --purple-light: #C084FC;
  --purple-soft: #F3E8FF;
  --purple-soft-2: #F9F5FF;
  --purple-border: #E9D5FF;

  /* Green */
  --green: #059669;
  --green-dark: #047857;
  --green-light: #34D399;
  --green-soft: #E8FAF0;

  /* Red */
  --red: #DC2626;
  --red-dark: #B91C1C;
  --red-soft: #FAE7E7;

  /* Teal */
  --teal: #0D9488;
  --teal-soft: #E6FFFA;

  /* Pink */
  --pink: #DB2777;
  --pink-soft: #FCE7F3;

  /* Indigo */
  --indigo: #4F46E5;
  --indigo-soft: #EEF2FF;

  /* Amber */
  --amber: #F59E0B;
  --amber-dark: #B45309;
  --amber-soft: #FEF3C7;

  /* Neutrals */
  --ink: #0F172A;
  --ink-2: #1F2937;
  --muted: #64748B;
  --muted-2: #6B7280;
  --bg: #F9FAFB;
  --line: #F3F4F6;
  --line-2: #E5E7EB;
  --white: #fff;

  /* Shadows */
  --shadow-sm: 0 4px 12px -4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.1);
  --shadow-orange: 0 8px 20px -6px rgba(242, 101, 34, 0.45);
  --shadow-orange-hover: 0 14px 28px -8px rgba(242, 101, 34, 0.55);
}

/* ============================================================
   2. BASE / RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  color: #4B5563;
  line-height: 1.6;
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--orange);
  color: #fff;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Focus States (Accessibility) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
   3. BOOTSTRAP UTILITY OVERRIDES
   ============================================================ */
.text-orange { color: var(--orange) !important; }
.text-muted { color: var(--muted) !important; }
.text-secondary { color: #4B5563 !important; }
.text-dark { color: var(--ink-2) !important; }
.text-white { color: #fff !important; }

.bg-white { background-color: #fff !important; }
.bg-primary-soft { background-color: var(--orange-soft-2); }
.bg-warning-soft { background-color: #FFF9E9; }
.bg-success-soft { background-color: var(--green-soft); }
.bg-info-soft { background-color: var(--blue-soft); }

/* ============================================================
   4. CUSTOM UTILITIES
   ============================================================ */
.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  letter-spacing: 0.3px;
  background: var(--orange-soft-2);
  color: var(--orange);
}

.section-badge.warning {
  background: #FFF9E9;
  color: var(--amber-dark);
}

.section-heading {
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0;
}

.divider-orange {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 2px;
  margin: 1rem auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */

/* Primary Orange Button */
.btn-orange {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.75rem 1.9rem;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-orange);
  text-decoration: none;
  border-radius: 50px;
}

.btn-orange::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.55s;
  pointer-events: none;
}

.btn-orange:hover::before {
  left: 100%;
}

.btn-orange:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-orange-hover);
}

/* Outline Orange Button */
.btn-outline-orange {
  color: var(--orange);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(242, 101, 34, 0.35);
  font-weight: 600;
  padding: 0.75rem 1.9rem;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s;
  border-radius: 50px;
  text-decoration: none;
}

.btn-outline-orange:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(242, 101, 34, 0.4);
}

/* Soft Button (white with border) */
.btn-soft {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: all 0.2s;
  gap: 6px;
  text-decoration: none;
  border-radius: 50px;
}

.btn-soft:hover {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange);
}

.btn-soft.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Small Button */
.btn-sm {
  min-height: 38px;
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 50px;
}

/* Icon Button (round) */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0;
}

.btn-icon:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  transform: translateY(-2px);
}

.btn-icon.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Theme Outline Button (used in grade sections) */
.btn-outline-theme {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid;
  font-weight: 600;
  padding: 0.75rem 1.9rem;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s;
  color: var(--orange);
  border-color: rgba(242, 101, 34, 0.35);
  border-radius: 50px;
  text-decoration: none;
}

.btn-outline-theme:hover {
  color: #fff !important;
  transform: translateY(-3px);
}

.grade-2nd .btn-outline-theme { color: var(--orange); border-color: rgba(242, 101, 34, 0.35); }
.grade-2nd .btn-outline-theme:hover { background: var(--orange); border-color: var(--orange); box-shadow: 0 12px 24px -8px rgba(242, 101, 34, 0.4); }
.grade-1st .btn-outline-theme { color: var(--blue); border-color: rgba(37, 99, 235, 0.35); }
.grade-1st .btn-outline-theme:hover { background: var(--blue); border-color: var(--blue); box-shadow: 0 12px 24px -8px rgba(37, 99, 235, 0.4); }
.grade-lecturer .btn-outline-theme { color: var(--purple); border-color: rgba(147, 51, 234, 0.35); }
.grade-lecturer .btn-outline-theme:hover { background: var(--purple); border-color: var(--purple); box-shadow: 0 12px 24px -8px rgba(147, 51, 234, 0.4); }

/* White Button (used on orange backgrounds) */
.btn-white {
  background: #fff;
  color: var(--orange);
  font-weight: 700;
  padding: 0.7rem 1.6rem;
  border-radius: 50px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  min-height: 46px;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.25);
  color: var(--orange-dark);
}

/* ============================================================
   6. NAVBAR
   ============================================================ */
.navbar {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 0;
  z-index: 1030;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink-2);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}

.navbar-brand i {
  font-size: 1.5rem;
}

.navbar-brand span {
  color: var(--orange);
}

.nav-link {
  font-weight: 500;
  color: #4B5563 !important;
  transition: color 0.2s;
  padding: 0.6rem 1rem !important;
  font-size: 0.95rem;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: all 0.3s;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--orange) !important;
}

.nav-link:hover::after {
  width: 60%;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  font-size: 1.3rem;
  background: transparent;
  color: var(--ink-2);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ============================================================
   7. READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  z-index: 2000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 8px rgba(242, 101, 34, 0.5);
}

/* ============================================================
   8. HERO (HOME)
   ============================================================ */
.hero-section {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 101, 34, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(27, 132, 255, 0.10) 0%, transparent 45%),
    linear-gradient(180deg, #FFFCFA 0%, #FFFFFF 55%, #F7FBFF 100%);
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero-orb.orb-1 {
  width: 340px;
  height: 340px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(242, 101, 34, 0.35), transparent 70%);
  animation: floatY 12s ease-in-out infinite alternate;
}

.hero-orb.orb-2 {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -60px;
  background: radial-gradient(circle, rgba(27, 132, 255, 0.30), transparent 70%);
  animation: floatY 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatY {
  0% { transform: translateY(0); }
  100% { transform: translateY(28px); }
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(242, 101, 34, 0.12), rgba(255, 138, 92, 0.10));
  color: var(--orange-dark);
  padding: 7px 18px;
  border-radius: 60px;
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  font-weight: 600;
  border: 1px solid rgba(242, 101, 34, 0.18);
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px -4px rgba(242, 101, 34, 0.15);
}

.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-weight: 800;
  font-size: clamp(1.9rem, 5.2vw, 3.6rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 1.15rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #F26522 0%, #FF8A5C 50%, #F26522 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(0.92rem, 1.8vw, 1.12rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}

.hero-trust {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  padding-top: 1.2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.75rem, 1.5vw, 0.87rem);
  color: var(--muted);
}

.hero-trust-item strong {
  color: var(--ink-2);
  font-weight: 700;
}

.hero-trust-avatars {
  display: flex;
}

.hero-trust-avatars span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #F26522, #FF8A5C);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: -8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
}

.hero-trust-avatars span:first-child {
  margin-left: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.hero-visual-img {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  border-radius: 28px;
  box-shadow:
    0 40px 80px -30px rgba(242, 101, 34, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  position: relative;
  z-index: 2;
  transition: transform 0.4s;
}

.hero-visual-img:hover {
  transform: translateY(-6px) scale(1.015);
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(242, 101, 34, 0.18), rgba(27, 132, 255, 0.15));
  z-index: 1;
  filter: blur(20px);
  pointer-events: none;
}

.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
  animation: floatCard 4s ease-in-out infinite alternate;
}

.float-card .fc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.float-card .fc-body { line-height: 1.2; }
.float-card .fc-title { font-size: 0.75rem; font-weight: 700; color: var(--ink); }
.float-card .fc-sub { font-size: 0.65rem; color: var(--muted); font-weight: 500; }

.float-card.fc-1 { top: 8%; left: -6%; animation-delay: 0s; }
.float-card.fc-1 .fc-icon { background: linear-gradient(135deg, #E8FAF0, #D1FADF); color: #059669; }
.float-card.fc-2 { bottom: 10%; right: -6%; animation-delay: 1.5s; }
.float-card.fc-2 .fc-icon { background: linear-gradient(135deg, #FFF9E9, #FEF3C7); color: #D97706; }
.float-card.fc-3 { bottom: 40%; left: -8%; animation-delay: 0.8s; }
.float-card.fc-3 .fc-icon { background: linear-gradient(135deg, #EBF4FF, #DBEAFE); color: #2563EB; }

@keyframes floatCard {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* ============================================================
   9. ENTRANCE ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-up.d-1 { animation-delay: 0.05s; }
.fade-up.d-2 { animation-delay: 0.15s; }
.fade-up.d-3 { animation-delay: 0.25s; }
.fade-up.d-4 { animation-delay: 0.35s; }
.fade-up.d-5 { animation-delay: 0.45s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   10. EXAM CARDS
   ============================================================ */
.exam-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.exam-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.exam-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border-color: var(--orange);
  color: inherit;
}

.exam-card:hover::before {
  opacity: 1;
}

.exam-card .icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: var(--orange-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--orange);
  transition: all 0.3s;
}

.exam-card:hover .icon-wrapper {
  background: var(--orange);
  color: #fff;
  transform: scale(1.05);
}

.exam-card h5 {
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.exam-card .exam-subtitle {
  font-size: 0.8rem;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}

.exam-card .badge-count {
  background: var(--line);
  color: #4B5563;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

/* ============================================================
   11. SUBJECT CHIPS
   ============================================================ */
.subject-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: all 0.2s;
  height: 100%;
  cursor: pointer;
  display: flex;               /* FIX: was missing — .subject-chip renders as an <a> in
                                   front-page.php (unlike the static <div> in the mockup),
                                   and an <a> is inline by default. Without this, height:100%
                                   is ignored and the icon/title/count don't stack or center
                                   the same way .grade-chip does, which is why "Popular
                                   subjects" looked broken/misaligned compared to the grade
                                   sections right below it on the homepage. */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.subject-chip:hover {
  border-color: var(--orange);
  background: var(--orange-soft-2);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.subject-chip .chip-icon {
  font-size: 1.3rem;
  color: var(--orange);
  display: block;
  margin-bottom: 0.3rem;
}

.subject-chip h6 {
  font-weight: 600;
  color: var(--ink-2);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.subject-chip small {
  color: var(--muted-2);
  font-size: 0.7rem;
}

/* ============================================================
   12. GRADE SECTIONS
   ============================================================ */
.grade-section {
  border-radius: 24px;
  padding: clamp(1.25rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  border: 2px solid;
  transition: all 0.3s;
}

.grade-section::before {
  position: absolute;
  top: -20px;
  right: -10px;
  font-size: clamp(5rem, 12vw, 8rem);
  pointer-events: none;
  line-height: 1;
  z-index: 0;
}

.grade-section > * {
  position: relative;
  z-index: 1;
}

.grade-2nd {
  background: linear-gradient(135deg, #FFF8F4 0%, #FFFFFF 100%);
  border-color: var(--orange-soft-2);
}
.grade-2nd::before { content: '★'; color: rgba(242, 101, 34, 0.05); }
.grade-2nd .grade-badge { background: var(--orange); }
.grade-2nd .grade-heading i { color: var(--orange); }
.grade-2nd .grade-chip:hover { border-color: var(--orange); background: var(--orange-soft-2); }
.grade-2nd .grade-chip .chip-icon { color: var(--orange); }
.grade-2nd .note-card:hover { border-color: var(--orange); }

.grade-1st {
  background: linear-gradient(135deg, #F5F9FF 0%, #FFFFFF 100%);
  border-color: #E5EFFF;
}
.grade-1st::before { content: '◆'; color: rgba(37, 99, 235, 0.05); }
.grade-1st .grade-badge { background: var(--blue); }
.grade-1st .grade-heading i { color: var(--blue); }
.grade-1st .grade-chip:hover { border-color: var(--blue); background: var(--blue-soft-2); }
.grade-1st .grade-chip .chip-icon { color: var(--blue); }
.grade-1st .note-card:hover { border-color: var(--blue); }

.grade-lecturer {
  background: linear-gradient(135deg, #F9F5FF 0%, #FFFFFF 100%);
  border-color: #F1E7FB;
}
.grade-lecturer::before { content: '✦'; color: rgba(147, 51, 234, 0.05); }
.grade-lecturer .grade-badge { background: var(--purple); }
.grade-lecturer .grade-heading i { color: var(--purple); }
.grade-lecturer .grade-chip:hover { border-color: var(--purple); background: var(--purple-soft-2); }
.grade-lecturer .grade-chip .chip-icon { color: var(--purple); }
.grade-lecturer .note-card:hover { border-color: var(--purple); }

.grade-badge {
  color: #fff;
  padding: 4px 18px;
  border-radius: 50px;
  font-size: clamp(0.65rem, 1.4vw, 0.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  white-space: nowrap;
}

.grade-heading {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  margin-bottom: 0;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grade-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-bottom: 0.9rem;
}

.grade-header-row .notes-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line-2);
  color: #374151;
  white-space: nowrap;
}

.grade-desc {
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.65;
}

.grade-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(0.55rem, 1.4vw, 0.75rem) 0.5rem;
  text-align: center;
  transition: all 0.2s;
  height: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.grade-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.grade-chip .chip-icon {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  display: block;
  margin-bottom: 0.3rem;
}

.grade-chip h6 {
  font-weight: 600;
  color: var(--ink-2);
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  margin-bottom: 0;
  line-height: 1.2;
}

.grade-chip small {
  color: var(--muted-2);
  font-size: clamp(0.6rem, 1.2vw, 0.7rem);
}

/* ============================================================
   13. NOTE CARDS (shared across all pages)
   ============================================================ */
.note-card {
  --note-pad: clamp(0.85rem, 2vw, 1rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  padding: var(--note-pad);
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.note-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
  color: inherit;
}

/* Thumbnail: full-width image at the top of every note card */
.note-card .note-thumb {
  margin: calc(-1 * var(--note-pad)) calc(-1 * var(--note-pad)) 0.85rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--orange-soft);
}

.note-card .note-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.45s ease;
}

.note-card:hover .note-thumb img { transform: scale(1.04); }

/* No featured image set: soft gradient with the exam / grade icon */
.note-card .note-thumb.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-soft) 0%, #fff 100%);
  color: var(--orange);
  font-size: 2.4rem;
}

.note-card .note-thumb.is-placeholder i { opacity: 0.55; }

@media (max-width: 576px) {
  .note-card .note-thumb { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  .note-card .note-thumb img { transition: none; }
  .note-card:hover .note-thumb img { transform: none; }
}

.note-card .note-tag {
  font-size: clamp(0.62rem, 1.3vw, 0.72rem);
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.note-tag.rpsc { background: var(--orange-soft); color: var(--orange); }
.note-tag.reet { background: var(--green-soft); color: var(--green); }
.note-tag.police { background: var(--red-soft); color: var(--red); }
.note-tag.patwari { background: var(--blue-soft); color: var(--blue); }
.note-tag.second-grade { background: var(--orange-soft); color: var(--orange); }
.note-tag.first-grade { background: var(--blue-soft); color: var(--blue); }
.note-tag.lecturer-tag { background: var(--purple-soft); color: var(--purple); }

.note-card .note-title {
  font-weight: 700;
  color: var(--ink-2);
  font-size: clamp(0.82rem, 1.7vw, 0.95rem);
  margin: 0.5rem 0 0.35rem;
  line-height: 1.3;
}

.note-card .note-desc {
  color: var(--muted-2);
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.note-card .note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.note-card .note-rating {
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

/* Fixed: pill button in note cards */
.note-card .btn-sm {
  min-height: 32px;
  padding: 0.3rem 0.95rem;
  font-size: clamp(0.68rem, 1.4vw, 0.78rem);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff !important;
  background: var(--orange);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.note-card .btn-sm:hover {
  background: var(--orange-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(242, 101, 34, 0.5);
}

/* Top row for category page notes */
.note-card .note-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.note-card .note-meta {
  font-size: 0.7rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Inline text CTA (used in related notes) */
.note-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.note-card:hover .note-cta {
  gap: 8px;
}

/* ============================================================
   14. FEATURED NOTE CARDS
   ============================================================ */
.featured-note {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.featured-note:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
  border-color: var(--orange);
}

.featured-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.featured-tag.rpsc { background: var(--orange-soft); color: var(--orange); }
.featured-tag.reet { background: var(--green-soft); color: var(--green); }
.featured-tag.police { background: var(--red-soft); color: var(--red); }

.featured-note .note-title {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 1rem;
  margin: 0.5rem 0 0.4rem;
  line-height: 1.35;
}

.featured-note .note-desc {
  color: var(--muted-2);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 0.9rem;
  flex-grow: 1;
}

.featured-note .note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.featured-note .note-rating {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

.featured-note .btn-sm {
  min-height: 34px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  background: var(--orange);
  color: #fff !important;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.featured-note .btn-sm:hover {
  background: var(--orange-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(242, 101, 34, 0.5);
}

/* ============================================================
   15. STATS GRID
   ============================================================ */
.stats-grid .stat-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s;
}

.stats-grid .stat-box:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.stats-grid .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.2;
}

.stats-grid .stat-box .text-secondary {
  font-size: 0.9rem;
}

/* ============================================================
   16. FOOTER
   ============================================================ */
.footer-dark {
  background: #111827;
  color: #9CA3AF;
}

.footer-dark h5,
.footer-dark h6 {
  color: #F9FAFB;
}

.footer-dark a {
  color: #9CA3AF;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-dark a:hover {
  color: var(--orange);
}

.footer-dark .form-control {
  background: #1F2937;
  border-color: #374151;
  color: #fff;
  min-height: 48px;
  font-size: 0.95rem;
  border-radius: 8px 0 0 8px;
}

.footer-dark .form-control::placeholder {
  color: #6B7280;
}

.footer-dark .form-control:focus {
  background: #1F2937;
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.15);
}

.footer-dark .btn-orange {
  min-height: 48px;
  padding: 0 1.5rem;
  font-size: 1rem;
  border-radius: 0 8px 8px 0;
}

/* ============================================================
   17. PAGE HERO (All Categories)
   ============================================================ */
.page-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 101, 34, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(27, 132, 255, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #FFFCFA 0%, #FFFFFF 100%);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.page-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.page-breadcrumb a:hover {
  color: var(--orange);
}

.page-breadcrumb .sep {
  color: #CBD5E1;
}

.page-breadcrumb .current {
  color: var(--ink-2);
  font-weight: 500;
}

.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 1rem;
}

.page-title {
  font-weight: 800;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.page-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--muted);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hero-search {
  position: relative;
  max-width: 520px;
}

.hero-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}

.hero-search input {
  width: 100%;
  padding: 0.9rem 1.2rem 0.9rem 3rem;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink-2);
  transition: all 0.25s;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.05);
}

.hero-search input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.12), 0 8px 24px -6px rgba(242, 101, 34, 0.2);
}

.hero-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.hero-quick-stats .stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-quick-stats .stat-item i {
  color: var(--orange);
}

.hero-quick-stats .stat-item strong {
  color: var(--ink-2);
  font-weight: 700;
}

/* ============================================================
   18. CATEGORY PAGE
   ============================================================ */
.category-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 101, 34, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(27, 132, 255, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #FFFCFA 0%, #FFFFFF 100%);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.category-hero .container {
  position: relative;
  z-index: 1;
}

.category-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.category-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.category-breadcrumb a:hover {
  color: var(--orange);
}

.category-breadcrumb .sep {
  color: #CBD5E1;
}

.category-breadcrumb .current {
  color: var(--ink-2);
  font-weight: 500;
}

.category-header-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.category-icon-lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 12px 30px -8px rgba(242, 101, 34, 0.5);
}

.category-icon-lg.blue {
  background: linear-gradient(135deg, var(--blue), #60A5FA);
  box-shadow: 0 12px 30px -8px rgba(37, 99, 235, 0.5);
}

.category-icon-lg.purple {
  background: linear-gradient(135deg, var(--purple), #C084FC);
  box-shadow: 0 12px 30px -8px rgba(147, 51, 234, 0.5);
}

.category-title-wrap {
  flex: 1;
  min-width: 200px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.5rem;
}

.category-title {
  font-weight: 800;
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.category-desc {
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 720px;
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.category-stats .stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line-2);
  padding: 5px 12px;
  border-radius: 50px;
  font-weight: 500;
}

.category-stats .stat-pill i {
  color: var(--orange);
}

.category-stats .stat-pill strong {
  color: var(--ink-2);
  font-weight: 700;
}

.category-layout {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 5vw, 4rem);
  background: #fff;
}

/* Filter Sidebar */
.filter-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.filter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 8px;
}

.filter-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.filter-card-title i {
  color: var(--orange);
}

.filter-clear {
  font-size: 0.75rem;
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  transition: background 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}

.filter-clear:hover {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.filter-group {
  margin-bottom: 1.1rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
  display: block;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.87rem;
  color: #475569;
  transition: color 0.2s;
}

.filter-check:hover {
  color: var(--orange);
}

.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-check .count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--line);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Toolbar */
.category-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  font-size: 0.88rem;
  background: #fff;
  color: var(--ink-2);
  transition: all 0.2s;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

.sort-select {
  padding: 0.6rem 2.2rem 0.6rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  font-size: 0.85rem;
  background: #fff
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e")
    no-repeat right 12px center;
  background-size: 14px;
  color: var(--ink-2);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-weight: 500;
}

.sort-select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

.mobile-filter-btn {
  display: none;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  align-items: center;
  gap: 6px;
}

.mobile-filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.results-count {
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

.results-count strong {
  color: var(--ink-2);
  font-weight: 700;
}

/* Active filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
  border: 1px solid rgba(242, 101, 34, 0.2);
  transition: all 0.2s;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--orange);
  color: #fff;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.pagination-custom {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-custom li a,
.pagination-custom li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-2);
  text-decoration: none;
  transition: all 0.2s;
}

.pagination-custom li a:hover {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange);
}

.pagination-custom li.active span {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 8px 20px -6px rgba(242, 101, 34, 0.5);
}

.pagination-custom li.disabled span {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border: 1px dashed var(--line-2);
  border-radius: 16px;
}

.empty-state i {
  font-size: 3rem;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 1rem;
}

.empty-state h4 {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

/* CTA section (shared) */
.cta-section {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-section h3 {
  font-weight: 800;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  margin-bottom: 0.5rem;
  color: #fff;
  position: relative;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.25rem;
  position: relative;
  font-size: 0.95rem;
}

/* Mobile Filter Drawer */
.filter-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.filter-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 90vw);
  background: #fff;
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.filter-drawer.open {
  transform: translateX(0);
}

.filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.filter-drawer-header h5 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.drawer-close {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ink-2);
  transition: background 0.2s;
  cursor: pointer;
}

.drawer-close:hover {
  background: var(--line);
}

.filter-drawer-body {
  padding: 1rem 1.25rem 1.5rem;
  flex: 1;
}

.filter-drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #fff;
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.5rem;
}

.filter-drawer-footer .btn {
  flex: 1;
}

/* ============================================================
   19. ALL CATEGORIES PAGE
   ============================================================ */
.categories-layout {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 5vw, 4rem);
  background: #fff;
}

.cat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cat-toolbar .results-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: auto;
}

.cat-toolbar .results-count strong {
  color: var(--ink-2);
  font-weight: 700;
}

.view-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}

.view-toggle button {
  background: transparent;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 50px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  cursor: pointer;
}

.view-toggle button.active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 10px -3px rgba(242, 101, 34, 0.4);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.filter-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(242, 101, 34, 0.4);
}

.filter-pill .pill-count {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Category cards grid */
.cat-grid .cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.cat-grid .cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cat-color, var(--orange)), var(--cat-color-light, var(--orange-light)));
  opacity: 0;
  transition: opacity 0.3s;
}

.cat-grid .cat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
  border-color: var(--cat-color, var(--orange));
  color: inherit;
}

.cat-grid .cat-card:hover::before {
  opacity: 1;
}

.cat-card .cat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.cat-card .cat-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--cat-soft, var(--orange-soft));
  color: var(--cat-color, var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
  transition: all 0.35s;
}

.cat-grid .cat-card:hover .cat-icon-wrap {
  background: var(--cat-color, var(--orange));
  color: #fff;
  transform: scale(1.05) rotate(-3deg);
}

.cat-card .cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 50px;
  background: var(--cat-soft, var(--orange-soft));
  color: var(--cat-color, var(--orange));
  white-space: nowrap;
}

.cat-card .cat-badge.trending {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #B45309;
}

.cat-card .cat-badge.new {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: var(--green);
}

.cat-card .cat-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.cat-card .cat-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.cat-card .cat-stats {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.cat-card .cat-stats .cat-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.cat-card .cat-stats .cat-stat i {
  color: var(--cat-color, var(--orange));
  font-size: 0.8rem;
}

.cat-card .cat-stats .cat-stat strong {
  color: var(--ink-2);
  font-weight: 700;
}

.cat-card .cat-arrow {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cat-soft, var(--orange-soft));
  color: var(--cat-color, var(--orange));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.3s;
  flex-shrink: 0;
}

.cat-grid .cat-card:hover .cat-arrow {
  background: var(--cat-color, var(--orange));
  color: #fff;
  transform: translateX(3px);
}

/* Color variants */
.cat-card.color-blue {
  --cat-color: var(--blue);
  --cat-color-light: #60A5FA;
  --cat-soft: var(--blue-soft);
}

.cat-card.color-purple {
  --cat-color: var(--purple);
  --cat-color-light: #C084FC;
  --cat-soft: var(--purple-soft);
}

.cat-card.color-green {
  --cat-color: var(--green);
  --cat-color-light: #34D399;
  --cat-soft: var(--green-soft);
}

.cat-card.color-red {
  --cat-color: var(--red);
  --cat-color-light: #F87171;
  --cat-soft: var(--red-soft);
}

.cat-card.color-teal {
  --cat-color: var(--teal);
  --cat-color-light: #2DD4BF;
  --cat-soft: var(--teal-soft);
}

.cat-card.color-pink {
  --cat-color: var(--pink);
  --cat-color-light: #F472B6;
  --cat-soft: var(--pink-soft);
}

.cat-card.color-indigo {
  --cat-color: var(--indigo);
  --cat-color-light: #818CF8;
  --cat-soft: var(--indigo-soft);
}

/* List view for category cards */
.cat-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cat-grid.list-view .cat-item {
  width: 100%;
}

.cat-grid.list-view .cat-card {
  flex-direction: row;
  align-items: center;
  padding: 1rem 1.25rem;
  border-radius: 16px;
}

.cat-grid.list-view .cat-card::before {
  height: 100%;
  width: 4px;
  top: 0;
  left: 0;
  right: auto;
  background: linear-gradient(180deg, var(--cat-color, var(--orange)), var(--cat-color-light, var(--orange-light)));
}

.cat-grid.list-view .cat-top {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.cat-grid.list-view .cat-icon-wrap {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  border-radius: 14px;
}

.cat-grid.list-view .cat-badge {
  display: none;
}

.cat-grid.list-view .cat-title {
  font-size: 1.02rem;
  margin-bottom: 0;
}

.cat-grid.list-view .cat-desc {
  display: none;
}

.cat-grid.list-view .cat-content {
  flex: 1;
  margin: 0 1rem;
  min-width: 0;
}

.cat-grid.list-view .cat-stats {
  border-top: none;
  padding-top: 0;
  margin: 0 1rem 0 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

/* ============================================================
   20. POST PAGE
   ============================================================ */
.post-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 101, 34, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(27, 132, 255, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #FFFCFA 0%, #FFFFFF 100%);
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2rem);
  position: relative;
}

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.post-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.post-breadcrumb a:hover {
  color: var(--orange);
}

.post-breadcrumb .sep {
  color: #CBD5E1;
}

.post-breadcrumb .current {
  color: var(--ink-2);
  font-weight: 500;
}

.post-title {
  font-weight: 800;
  font-size: clamp(1.6rem, 4.2vw, 2.75rem);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-meta-item i {
  color: var(--orange);
}

.post-meta-item strong {
  color: var(--ink-2);
  font-weight: 600;
}

.post-tag-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.post-layout {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 5vw, 4rem);
  background: #fff;
}

/* Article Content */
.article-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #374151;
}

.article-content > * + * {
  margin-top: 1.2rem;
}

.article-content h2 {
  font-weight: 800;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange-soft-2);
  scroll-margin-top: 90px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--orange), var(--orange-light));
  border-radius: 4px;
  flex-shrink: 0;
}

.article-content h3 {
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
  color: var(--ink-2);
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  scroll-margin-top: 90px;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content strong {
  color: var(--ink-2);
  font-weight: 700;
}

.article-content a {
  color: var(--orange);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.article-content a:hover {
  color: var(--orange-dark);
}

.article-content blockquote {
  background: linear-gradient(135deg, var(--orange-soft-2), #fff);
  border-left: 4px solid var(--orange);
  padding: 1rem 1.2rem;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink-2);
  margin: 1.5rem 0;
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 3rem;
  color: rgba(242, 101, 34, 0.18);
  font-family: Georgia, serif;
  line-height: 1;
}

.article-content code {
  background: #F1F5F9;
  color: #BE185D;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, var(--green-soft), #fff);
  border-left: 4px solid var(--green);
  padding: 1rem 1.2rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
  display: flex;
  gap: 12px;
}

.highlight-box .hb-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.highlight-box .hb-body {
  flex: 1;
}

.highlight-box strong {
  color: var(--green-dark);
  display: block;
  margin-bottom: 4px;
}

.highlight-box p {
  margin: 0;
  font-size: 0.94rem;
  color: #374151;
}

/* Key Facts Table */
.key-facts {
  background: #F8FAFC;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.key-facts table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.key-facts th,
.key-facts td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
}

.key-facts tr:last-child th,
.key-facts tr:last-child td {
  border-bottom: none;
}

.key-facts th {
  background: #F1F5F9;
  font-weight: 600;
  color: var(--ink-2);
  width: 40%;
}

.key-facts td {
  color: #475569;
}

/* Sidebar */
.sidebar-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.toc-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-title i {
  color: var(--orange);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--line);
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.2s;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--orange);
  border-left-color: var(--orange);
  background: var(--orange-soft-2);
}

.toc-list a.active {
  color: var(--orange);
  border-left-color: var(--orange);
  font-weight: 600;
  background: var(--orange-soft-2);
}

.toc-list a .toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #F1F5F9;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
}

.toc-list a:hover .toc-num,
.toc-list a.active .toc-num {
  background: var(--orange);
  color: #fff;
}

/* Recent Notes (sidebar) */
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent-list li + li { border-top: 1px solid var(--line); }

.recent-list a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.15rem;
  text-decoration: none;
  transition: all 0.2s;
}

.recent-list-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.1rem;
}

.recent-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-list-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.recent-list-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-list-meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.recent-list a:hover .recent-list-title { color: var(--orange); }

/* Author Card */
.author-card {
  background: linear-gradient(135deg, #FFFCFA, #fff);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  box-shadow: 0 8px 20px -6px rgba(242, 101, 34, 0.45);
}

.author-name {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.author-role {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.share-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Related section */
.related-section {
  background: var(--bg);
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.related-title {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-title i {
  color: var(--orange);
}

/* ============================================================
   21. COMMENTS SECTION (POST PAGE)
   ============================================================ */
.comments-section {
  padding: clamp(2rem, 4vw, 3rem) 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.comments-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.comments-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comments-title {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-title i {
  color: var(--orange);
}

.comments-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 50px;
  white-space: nowrap;
}

/* Sort dropdown */
.comments-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.comments-sort label {
  margin: 0;
  white-space: nowrap;
}

.comments-sort select {
  padding: 0.45rem 2rem 0.45rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 50px;
  font-size: 0.82rem;
  background: #fff
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e")
    no-repeat right 10px center;
  background-size: 12px;
  color: var(--ink-2);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-weight: 500;
}

.comments-sort select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

/* Comment Form */
.comment-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  transition: all 0.3s;
}

.comment-form-card:focus-within {
  border-color: var(--orange);
  box-shadow: 0 8px 24px -8px rgba(242, 101, 34, 0.15);
}

.comment-form-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.9rem;
}

.comment-form-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -4px rgba(242, 101, 34, 0.4);
}

.comment-form-body {
  flex: 1;
  min-width: 0;
}

.comment-form-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.comment-form-name strong {
  color: var(--ink-2);
  font-weight: 700;
}

.comment-textarea {
  width: 100%;
  min-height: 90px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink-2);
  background: #fff;
  resize: vertical;
  transition: all 0.2s;
  line-height: 1.55;
}

.comment-textarea::placeholder {
  color: #9CA3AF;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

.comment-form-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.comment-form-tools {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.comment-tool-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all 0.2s;
  cursor: pointer;
}

.comment-tool-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.comment-submit-btn {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
  box-shadow: 0 8px 20px -6px rgba(242, 101, 34, 0.4);
  min-height: 40px;
  cursor: pointer;
}

.comment-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(242, 101, 34, 0.5);
  color: #fff;
}

.comment-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  transition: all 0.25s;
}

.comment-item:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.06);
}

.comment-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.65rem;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.15);
}

.comment-avatar.bg-1 { background: linear-gradient(135deg, #F26522, #FF8A5C); }
.comment-avatar.bg-2 { background: linear-gradient(135deg, #2563EB, #60A5FA); }
.comment-avatar.bg-3 { background: linear-gradient(135deg, #059669, #34D399); }
.comment-avatar.bg-4 { background: linear-gradient(135deg, #9333EA, #C084FC); }
.comment-avatar.bg-5 { background: linear-gradient(135deg, #DB2777, #F472B6); }

.comment-meta {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.comment-author {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--orange-soft);
  color: var(--orange);
  white-space: nowrap;
}

.comment-badge.author-badge {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #B45309;
}

.comment-badge.verified-badge {
  background: var(--green-soft);
  color: var(--green);
}

.comment-time {
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.comment-body {
  font-size: 0.92rem;
  color: #4B5563;
  line-height: 1.65;
  margin-bottom: 0.75rem;
  word-wrap: break-word;
}

.comment-body p {
  margin: 0 0 0.5rem;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.comment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.comment-action-btn:hover {
  color: var(--orange);
  background: var(--orange-soft);
}

.comment-action-btn.liked {
  color: var(--orange);
  background: var(--orange-soft);
}

.comment-action-btn.liked i {
  color: var(--orange);
}

.comment-action-count {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Nested Replies */
.comment-replies {
  margin-top: 1rem;
  margin-left: 2.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-replies .comment-item {
  background: #FBFCFD;
}

/* Load more */
.comments-load-more {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.comments-load-more button {
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 42px;
}

.comments-load-more button:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
  transform: translateY(-2px);
}

/* Empty state */
.comments-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #FBFCFD;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
}

.comments-empty i {
  font-size: 2.5rem;
  color: var(--muted);
  opacity: 0.4;
  margin-bottom: 0.75rem;
  display: block;
}

.comments-empty h5 {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.comments-empty p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ============================================================
   22. PRIVACY PAGE
   ============================================================ */
.policy-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 101, 34, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(27, 132, 255, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #FFFCFA 0%, #FFFFFF 100%);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.policy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.policy-hero .container {
  position: relative;
  z-index: 1;
}

.policy-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.policy-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.policy-breadcrumb a:hover {
  color: var(--orange);
}

.policy-breadcrumb .sep {
  color: #CBD5E1;
}

.policy-breadcrumb .current {
  color: var(--ink-2);
  font-weight: 500;
}

.policy-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 1rem;
}

.policy-title {
  font-weight: 800;
  font-size: clamp(1.75rem, 4.5vw, 2.85rem);
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.policy-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--muted);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 1rem;
}

.policy-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.policy-meta-item i {
  color: var(--orange);
}

.policy-meta-item strong {
  color: var(--ink-2);
  font-weight: 600;
}

.policy-layout {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 5vw, 4rem);
  background: #fff;
}

.policy-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
  max-width: 100%;
}

.policy-content > section {
  scroll-margin-top: 90px;
  padding-bottom: 0.5rem;
}

.policy-content > section + section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.policy-content h2 {
  font-weight: 800;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.policy-content h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -4px rgba(242, 101, 34, 0.4);
}

.policy-content h3 {
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-2);
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
}

.policy-content p {
  margin-bottom: 1rem;
}

.policy-content p:last-child {
  margin-bottom: 0;
}

.policy-content ul,
.policy-content ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.policy-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.policy-content li:last-child {
  margin-bottom: 0;
}

.policy-content strong {
  color: var(--ink-2);
  font-weight: 700;
}

.policy-content a {
  color: var(--orange);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.policy-content a:hover {
  color: var(--orange-dark);
}

/* Callouts */
.policy-callout {
  display: flex;
  gap: 14px;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  margin: 1.25rem 0;
  border-left: 4px solid;
  font-size: 0.94rem;
}

.policy-callout .pc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: #fff;
}

.policy-callout .pc-body {
  flex: 1;
}

.policy-callout .pc-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.policy-callout p {
  margin: 0;
  font-size: 0.92rem;
}

.policy-callout.info {
  background: linear-gradient(135deg, #EBF2FF, #fff);
  border-color: var(--blue);
}
.policy-callout.info .pc-icon { background: var(--blue); }
.policy-callout.info .pc-title { color: var(--blue-dark); }

.policy-callout.success {
  background: linear-gradient(135deg, var(--green-soft), #fff);
  border-color: var(--green);
}
.policy-callout.success .pc-icon { background: var(--green); }
.policy-callout.success .pc-title { color: var(--green); }

.policy-callout.warning {
  background: linear-gradient(135deg, #FFF9E9, #fff);
  border-color: var(--amber);
}
.policy-callout.warning .pc-icon { background: var(--amber); }
.policy-callout.warning .pc-title { color: var(--amber-dark); }

/* Data Table */
.data-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 500px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
}

.data-table thead th {
  background: #F8FAFC;
  font-weight: 700;
  color: var(--ink-2);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #FAFBFC;
}

.data-table td {
  color: #475569;
}

/* Policy sidebar */
.policy-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.summary-card h6 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-card h6 i {
  color: var(--orange);
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.summary-list li {
  display: flex;
  gap: 10px;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line-2);
  line-height: 1.5;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list i {
  color: var(--green);
  margin-top: 3px;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.summary-list span {
  color: #475569;
}

/* Contact card */
.contact-card {
  background: linear-gradient(135deg, #FFFCFA, #fff);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.contact-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 20px -6px rgba(242, 101, 34, 0.45);
}

.contact-card h6 {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
  line-height: 1.55;
}

.contact-card .btn-orange {
  width: 100%;
  border-radius: 50px;
  font-size: 0.88rem;
}

/* Acceptance banner */
.acceptance-banner {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}

.acceptance-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.acceptance-banner h3 {
  font-weight: 800;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  margin-bottom: 0.5rem;
  color: #fff;
  position: relative;
  z-index: 1;
}

.acceptance-banner p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
}

/* ============================================================
   23. RESPONSIVE — ALL PAGES
   ============================================================ */

/* --- Large tablets & small laptops (max-width: 991.98px) --- */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.3rem;
  }
  .navbar-brand i {
    font-size: 1.3rem;
  }

  .hero-visual {
    margin-top: 2.5rem;
    padding: 0.5rem;
  }
  .float-card.fc-1 { top: 4%; left: 2%; }
  .float-card.fc-2 { bottom: 4%; right: 2%; }
  .float-card.fc-3 { display: none; }

  .filter-sidebar { display: none; }
  .mobile-filter-btn { display: inline-flex; }

  .category-icon-lg {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
    border-radius: 16px;
  }

  .sidebar-sticky,
  .policy-sidebar {
    position: static;
    margin-top: 1.5rem;
  }
}

/* --- Tablets (max-width: 767.98px) --- */
@media (max-width: 767.98px) {
  .hero-section { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero-visual { margin-top: 2rem; }
  .hero-visual-img { max-width: 340px; border-radius: 22px; }

  .float-card { padding: 8px 12px; border-radius: 12px; }
  .float-card .fc-icon { width: 28px; height: 28px; font-size: 0.8rem; }
  .float-card .fc-title { font-size: 0.68rem; }
  .float-card .fc-sub { font-size: 0.58rem; }
  .float-card.fc-1 { top: 2%; left: 0; }
  .float-card.fc-2 { bottom: 2%; right: 0; }

  .exam-card { padding: 1.25rem 0.75rem; border-radius: 16px; }
  .exam-card .icon-wrapper {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 14px;
  }
  .exam-card h5 { font-size: 1rem; }

  .grade-section { border-radius: 20px; }
  .grade-header-row { gap: 0.5rem; }
  .grade-header-row .notes-count {
    margin-left: 0;
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .category-hero { padding: 1.5rem 0 1.25rem; }
  .category-toolbar { padding: 0.75rem 0.85rem; }
  .results-count {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .cat-toolbar { gap: 0.5rem; }
  .cat-toolbar .results-count { width: 100%; margin-bottom: 0.25rem; }
  .view-toggle { display: none; }

  .cat-grid.list-view .cat-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  .cat-grid.list-view .cat-content { margin: 0.75rem 0 0; }
  .cat-grid.list-view .cat-stats {
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    justify-content: flex-start;
    width: 100%;
  }

  .post-hero { padding: 1.25rem 0 1rem; }
  .post-meta { font-size: 0.82rem; gap: 0.5rem 1rem; }
  .article-content { font-size: 0.98rem; line-height: 1.75; }
  .article-content h2 { margin-top: 1.75rem; font-size: 1.25rem; }
  .article-content h3 { font-size: 1.08rem; }
  .key-facts th,
  .key-facts td { padding: 0.6rem 0.8rem; font-size: 0.85rem; }

  .policy-hero { padding: 1.5rem 0 1.25rem; }
  .policy-content { font-size: 0.98rem; }
  .policy-content h2 { font-size: 1.2rem; }
  .policy-content h2 .section-num {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }
  .policy-meta { font-size: 0.8rem; gap: 0.5rem 1rem; }
  .data-table th,
  .data-table td { padding: 0.6rem 0.75rem; font-size: 0.85rem; }

  /* Comments — tablet */
  .comments-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .comments-sort { width: 100%; }
  .comments-sort select { flex: 1; }
  .comment-replies {
    margin-left: 1rem;
    padding-left: 0.75rem;
  }
  .comment-form-head { gap: 10px; }
  .comment-form-avatar { width: 40px; height: 40px; font-size: 0.9rem; }

  .footer-dark { padding: 3rem 0; }
  .footer-dark h5 { font-size: 1.1rem; }
  .footer-dark h6 { font-size: 0.9rem; }
}

/* --- Mobile landscape (max-width: 575.98px) --- */
@media (max-width: 575.98px) {
  body { font-size: 14px; }

  .hero-section { padding: 1.75rem 0 2.25rem; }
  .hero-cta .btn-orange,
  .hero-cta .btn-outline-orange {
    flex: 1 1 100%;
    width: 100%;
    min-height: 48px;
    font-size: 0.92rem;
    padding: 0.7rem 1.2rem;
  }
  .hero-trust {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
  }
  .hero-visual-img { max-width: 280px; border-radius: 20px; }
  .float-card.fc-1 { top: 0; left: -4px; }
  .float-card.fc-2 { bottom: 0; right: -4px; }

  .exam-card { padding: 1rem 0.6rem; border-radius: 14px; }
  .exam-card .icon-wrapper {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    border-radius: 12px;
    margin-bottom: 0.6rem;
  }
  .exam-card h5 { font-size: 0.88rem; }
  .exam-card .exam-subtitle { font-size: 0.68rem; }
  .exam-card .badge-count { font-size: 0.62rem; padding: 2px 8px; }

  .grade-section { border-radius: 16px; }
  .grade-badge { font-size: 0.62rem; padding: 3px 12px; }
  .note-card { border-radius: 12px; }
  .btn-outline-theme {
    min-height: 42px;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
  }

  .subject-chip { padding: 0.55rem 0.35rem; border-radius: 12px; }
  .subject-chip h6 { font-size: 0.78rem; }
  .subject-chip small { font-size: 0.65rem; }
  .subject-chip .chip-icon { font-size: 1.1rem; }

  .stats-grid .stat-box { padding: 1rem 0.5rem; border-radius: 12px; }
  .stats-grid .stat-number { font-size: 1.5rem; }
  .stats-grid .stat-box .text-secondary { font-size: 0.75rem; }

  .page-title { font-size: 1.55rem; }
  .hero-search input {
    font-size: 0.9rem;
    padding: 0.8rem 1rem 0.8rem 2.7rem;
  }
  .filter-pill { font-size: 0.75rem; padding: 0.45rem 0.85rem; }
  .cat-grid .cat-card { padding: 1.25rem; border-radius: 16px; }
  .cat-card .cat-icon-wrap {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
    border-radius: 14px;
  }
  .cat-card .cat-title { font-size: 1.05rem; }
  .cat-card .cat-desc { font-size: 0.82rem; }

  .category-title { font-size: 1.5rem; }
  .category-icon-lg {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
    border-radius: 14px;
  }
  .pagination-custom li a,
  .pagination-custom li span {
    min-width: 36px;
    height: 36px;
    font-size: 0.82rem;
    padding: 0 8px;
  }

  .cta-section,
  .acceptance-banner {
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    text-align: center;
  }
  .cta-section .btn-white,
  .acceptance-banner .btn-white {
    width: 100%;
    justify-content: center;
  }

  .post-title { font-size: 1.5rem; }
  .article-content { font-size: 0.95rem; }
  .article-content h2 { font-size: 1.15rem; padding-bottom: 0.4rem; }
  .article-content h2::before { height: 18px; width: 3px; }
  .article-content blockquote {
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
  }
  .highlight-box {
    padding: 0.85rem 1rem;
    flex-direction: column;
    gap: 10px;
  }

  .policy-title { font-size: 1.55rem; }
  .policy-content { font-size: 0.95rem; }
  .policy-content h2 { font-size: 1.1rem; gap: 10px; }
  .policy-content h2 .section-num {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .policy-content h3 { font-size: 1rem; }
  .policy-callout {
    padding: 0.85rem 1rem;
    gap: 10px;
    font-size: 0.9rem;
  }
  .policy-callout .pc-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .policy-callout .pc-title { font-size: 0.87rem; }
  .policy-callout p { font-size: 0.87rem; }

  /* Comments — small mobile */
  .comment-item { padding: 0.9rem 0.95rem; }
  .comment-avatar { width: 36px; height: 36px; font-size: 0.82rem; }
  .comment-author { font-size: 0.86rem; }
  .comment-body { font-size: 0.88rem; }
  .comment-replies {
    margin-left: 0.5rem;
    padding-left: 0.6rem;
  }
  .comment-form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .comment-submit-btn {
    width: 100%;
    justify-content: center;
  }
  .comment-form-tools { justify-content: center; }

  .navbar-brand { font-size: 1.1rem; }
  .navbar-brand i { font-size: 1.1rem; }
  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem !important;
  }

  .footer-dark .form-control { min-height: 44px; font-size: 0.85rem; }
  .footer-dark .btn-orange {
    min-height: 44px;
    padding: 0 1rem;
    font-size: 0.85rem;
  }
}

/* --- Extra small phones (max-width: 380px) --- */
@media (max-width: 380px) {
  .hero-title { font-size: 1.6rem; }
  .hero-visual-img { max-width: 240px; }
  .float-card { padding: 6px 10px; }
  .float-card .fc-title { font-size: 0.62rem; }
  .float-card .fc-sub { font-size: 0.54rem; }

  .page-title { font-size: 1.35rem; }
  .hero-quick-stats { font-size: 0.75rem; gap: 0.5rem 0.9rem; }

  .category-title { font-size: 1.35rem; }
  .category-stats .stat-pill { font-size: 0.75rem; padding: 4px 10px; }

  .post-title { font-size: 1.3rem; }
  .article-content { font-size: 0.92rem; }
  .key-facts th,
  .key-facts td { padding: 0.55rem 0.65rem; font-size: 0.8rem; }

  .policy-title { font-size: 1.35rem; }
  .policy-content { font-size: 0.92rem; }
  .data-table th,
  .data-table td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }

  .comments-title { font-size: 1.1rem; }
  .comment-form-card { padding: 1rem; }
  .comment-form-avatar { width: 36px; height: 36px; font-size: 0.82rem; }
  .comment-textarea { font-size: 0.88rem; padding: 0.7rem 0.85rem; }
}

/* --- Landscape orientation fix --- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section { padding: 1.5rem 0 1rem; }
  .hero-title { font-size: 1.8rem; }
}

/* ============================================================
   24. PRINT STYLES
   ============================================================ */
@media print {
  .navbar,
  .footer-dark,
  .hero-orb,
  .float-card,
  .reading-progress,
  .filter-sidebar,
  .policy-sidebar,
  .sidebar-sticky,
  .mobile-filter-btn,
  .category-toolbar,
  .filter-pills,
  .cat-toolbar,
  .view-toggle,
  .pagination-wrap,
  .cta-section,
  .acceptance-banner,
  .related-section,
  .post-actions,
  .hero-search,
  .filter-drawer,
  .filter-drawer-backdrop,
  .comments-section,
  .comment-form-card,
  .comments-load-more {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .hero-section,
  .category-hero,
  .post-hero,
  .policy-hero,
  .page-hero {
    background: #fff !important;
    padding: 1rem 0;
  }

  .hero-section::before,
  .category-hero::before,
  .policy-hero::before,
  .page-hero::before {
    display: none;
  }

  .category-layout,
  .post-layout,
  .policy-layout,
  .categories-layout {
    padding: 1rem 0;
  }

  .article-content,
  .policy-content {
    font-size: 12pt;
    line-height: 1.5;
  }

  .article-content a,
  .policy-content a {
    color: #000;
    text-decoration: underline;
  }

  .article-content h2,
  .policy-content h2,
  .article-content h3 {
    page-break-after: avoid;
  }

  .article-content h2,
  .policy-content > section,
  .key-facts,
  .highlight-box,
  .data-table-wrap,
  .policy-callout {
    page-break-inside: avoid;
  }

  .note-card,
  .exam-card,
  .grade-section,
  .cat-grid .cat-card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
}
/* ============================================================
   25. WORDPRESS COMMENT FORM (default field markup)
   ------------------------------------------------------------
   Section 21 above styles the custom .comment-item /
   .comment-form-card markup our own comments.php callback
   prints for the list of comments. This section styles the
   parts WordPress still renders itself — comment_form()'s
   default <p>/<label>/<input> structure (name, email, URL,
   cookie-consent, the "Cancel reply" link, pagination) — so
   nothing on the real comment form is left unstyled.
   ============================================================ */
.comment-respond { margin-bottom: 1.75rem; }

.comment-reply-title {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-reply-title small { font-size: 0.72rem; font-weight: 600; }

#cancel-comment-reply-link {
  color: var(--orange);
  text-decoration: none;
}

#cancel-comment-reply-link:hover { text-decoration: underline; }

.comment-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  transition: all 0.3s;
}

.comment-form-card:focus-within {
  border-color: var(--orange);
  box-shadow: 0 8px 24px -8px rgba(242, 101, 34, 0.15);
}

.comment-form-card p { margin-bottom: 1rem; }
.comment-form-card p:last-child { margin-bottom: 0; }

.comment-notes, .logged-in-as {
  font-size: 0.82rem;
  color: var(--muted);
}

.comment-form-card label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}

.comment-form-card .required { color: var(--red); }

.comment-form-card input[type="text"],
.comment-form-card input[type="email"],
.comment-form-card input[type="url"],
.comment-form-card textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink-2);
  background: #fff;
  transition: all 0.2s;
}

.comment-form-card textarea {
  min-height: 110px;
  line-height: 1.55;
  resize: vertical;
}

.comment-form-card input:focus,
.comment-form-card textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-form-card .form-submit { margin-bottom: 0; }

.comment-submit-btn {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
  box-shadow: 0 8px 20px -6px rgba(242, 101, 34, 0.4);
  min-height: 40px;
  cursor: pointer;
}

.comment-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(242, 101, 34, 0.5);
  color: #fff;
}

/* Comment list — real WP markup uses .comment-list / .children,
   our callback adds .comment-item on top of WP's own .comment class */
.comment-list, .comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-list .children, .comment-replies {
  list-style: none;
  margin-top: 1rem;
  margin-left: 2.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-list .children .comment-item { background: #FBFCFD; }

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.comment-awaiting-moderation {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 0.5rem;
}

.comment-navigation, .comments-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 576px) {
  .comment-list .children, .comment-replies { margin-left: 1.1rem; padding-left: 0.75rem; }
}

/* ============================================================
   26. WORDPRESS CORE, EDITOR CONTENT & ACCESSIBILITY
   ------------------------------------------------------------
   Things WordPress itself outputs that the original static
   design never had markup for: screen-reader text, skip link,
   alignment classes, captions, galleries, editor tables / code
   / images / embeds, Gutenberg blocks, widgets, search form,
   page links, password form, admin-bar offsets, custom logo.
   ============================================================ */

/* --- Screen reader text + skip link --- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  clip: auto !important;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
}

.skip-link:focus { color: var(--orange-dark); }

#primary:focus { outline: none; }

/* --- Admin bar: keep sticky elements below it for logged-in users --- */
.admin-bar .navbar.sticky-top { top: 32px; }
.admin-bar .reading-progress { top: 32px; }
.admin-bar .sidebar-sticky { top: 122px; }

@media (max-width: 782px) {
  .admin-bar .navbar.sticky-top { top: 46px; }
  .admin-bar .reading-progress { top: 46px; }
}

@media (max-width: 600px) {
  /* Admin bar is no longer fixed on very small screens */
  .admin-bar .navbar.sticky-top { top: 0; }
  .admin-bar .reading-progress { top: 0; }
}

/* --- Custom logo (Appearance → Customize → Site Identity) --- */
.navbar-brand .custom-logo-link { display: inline-flex; align-items: center; }
.navbar-brand .custom-logo { max-height: 42px; width: auto; height: auto; }

/* --- Anchors land below the sticky navbar --- */
.article-content h2,
.article-content h3,
.policy-content h2 { scroll-margin-top: 90px; }
.admin-bar .article-content h2,
.admin-bar .article-content h3,
.admin-bar .policy-content h2 { scroll-margin-top: 122px; }

/* --- Alignment classes from the editor --- */
.article-content::after,
.page-content::after { content: ""; display: table; clear: both; }

.alignleft,
.article-content .alignleft {
  float: left;
  margin: 0.3rem 1.5rem 1rem 0;
  max-width: 50%;
}

.alignright,
.article-content .alignright {
  float: right;
  margin: 0.3rem 0 1rem 1.5rem;
  max-width: 50%;
}

.aligncenter,
.article-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  clear: both;
}

.alignwide,
.alignfull { max-width: 100%; margin-left: auto; margin-right: auto; }

@media (max-width: 576px) {
  .alignleft,
  .alignright,
  .article-content .alignleft,
  .article-content .alignright {
    float: none;
    display: block;
    max-width: 100%;
    margin: 1rem auto;
  }
}

/* --- Images, figures & captions --- */
.article-content img,
.page-content img { max-width: 100%; height: auto; border-radius: 12px; }

.article-content figure { margin: 1.5rem 0; max-width: 100%; }
.article-content figure img { display: block; margin: 0 auto; }

.wp-caption { max-width: 100%; margin-bottom: 1.25rem; }
.wp-caption img { display: block; margin: 0 auto; }

.wp-caption-text,
.article-content figcaption,
.wp-element-caption,
.gallery-caption {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.5;
}

.wp-smiley,
.article-content img.emoji {
  display: inline;
  height: 1em;
  width: 1em;
  margin: 0 0.07em;
  vertical-align: -0.1em;
  border-radius: 0;
  box-shadow: none;
}

/* --- Classic gallery --- */
.gallery {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  grid-template-columns: repeat(3, 1fr);
}
.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
  .gallery-columns-4,
  .gallery-columns-5,
  .gallery-columns-6,
  .gallery-columns-7,
  .gallery-columns-8,
  .gallery-columns-9 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery[class*="gallery-columns-"] { grid-template-columns: repeat(2, 1fr); }
  .gallery.gallery-columns-1 { grid-template-columns: 1fr; }
}

/* --- Tables from the editor (the custom .key-facts table is untouched) --- */
.article-content > table,
.article-content .wp-block-table table,
.page-content > table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
}

.article-content > table th,
.article-content > table td,
.article-content .wp-block-table th,
.article-content .wp-block-table td,
.page-content > table th,
.page-content > table td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  color: #475569;
}

.article-content > table th:last-child,
.article-content > table td:last-child,
.article-content .wp-block-table th:last-child,
.article-content .wp-block-table td:last-child { border-right: none; }

.article-content > table tr:last-child td,
.article-content > table tbody tr:last-child th,
.article-content .wp-block-table tr:last-child td { border-bottom: none; }

.article-content > table thead th,
.article-content > table thead td,
.article-content .wp-block-table thead th,
.article-content > table tr:first-child th {
  background: #F1F5F9;
  color: var(--ink-2);
  font-weight: 700;
  border-bottom: 2px solid var(--line-2);
}

.article-content > table tbody tr:nth-child(even) td,
.article-content .wp-block-table tbody tr:nth-child(even) td { background: #FAFBFC; }

.article-content > table caption {
  caption-side: bottom;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.article-content > table thead td,
.article-content > table th { color: var(--ink-2); font-weight: 700; }

.article-content .wp-block-table { margin: 1.5rem 0; overflow-x: auto; }
.article-content .wp-block-table table { margin: 0; }
.article-content .wp-block-table figcaption { margin-top: 0.5rem; }

@media (max-width: 768px) {
  .article-content > table,
  .page-content > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Code blocks, hr, embeds --- */
.article-content pre,
.page-content pre {
  background: #0F172A;
  color: #E2E8F0;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.65;
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  -webkit-overflow-scrolling: touch;
}

.article-content pre code,
.page-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.article-content hr,
.page-content hr,
.wp-block-separator {
  border: 0;
  height: 2px;
  background: var(--line-2);
  margin: 2rem auto;
  opacity: 1;
}

.article-content iframe,
.article-content video,
.article-content embed,
.article-content object { max-width: 100%; border-radius: 12px; }

.article-content .wp-block-embed { margin: 1.5rem 0; }
.article-content .wp-block-embed iframe { width: 100%; }

.article-content blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--muted);
}

.article-content mark {
  background: var(--amber-soft);
  color: inherit;
  padding: 0 4px;
  border-radius: 4px;
}

.article-content kbd {
  background: #F1F5F9;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.85em;
  font-family: inherit;
}

/* --- Gutenberg blocks (theme-tuned) --- */
.article-content .wp-block-image,
.article-content .wp-block-gallery { margin: 1.5rem 0; }

.article-content .wp-block-columns { gap: 1.25rem; margin: 1.5rem 0; }

.article-content .wp-block-pullquote {
  border-top: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  padding: 1.25rem 0;
  text-align: center;
}
.article-content .wp-block-pullquote blockquote {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.article-content .wp-block-pullquote blockquote::before { display: none; }

.article-content .wp-block-details {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
}
.article-content .wp-block-details summary { font-weight: 700; color: var(--ink-2); cursor: pointer; }

.article-content .wp-block-button__link,
.wp-block-button__link {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 8px 20px -6px rgba(242, 101, 34, 0.4);
  transition: all 0.25s;
}
.article-content .wp-block-button__link:hover,
.wp-block-button__link:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(242, 101, 34, 0.5);
}
.article-content .is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
  box-shadow: none;
}

.article-content .wp-block-file {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}
.article-content .wp-block-file a:not(.wp-block-file__button) {
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.article-content .wp-block-file .wp-block-file__button {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border-radius: 50px;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

/* --- Page links (<!--nextpage--> pagination) --- */
.page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 1.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.page-links-title { margin-right: 0.25rem; }
.page-links .post-page-numbers {
  min-width: 38px;
  height: 38px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.2s;
}
.page-links a.post-page-numbers:hover { border-color: var(--orange); color: var(--orange); }
.page-links .post-page-numbers.current {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* --- Generic pagination pieces WP prints elsewhere (comments, nav-links) --- */
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

.comments-pagination .page-numbers,
.comment-navigation a,
.nav-links .page-numbers {
  min-width: 38px;
  height: 38px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.comments-pagination a.page-numbers:hover,
.comment-navigation a:hover,
.nav-links a.page-numbers:hover { border-color: var(--orange); color: var(--orange); }
.comments-pagination .page-numbers.current,
.nav-links .page-numbers.current {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* --- Password-protected posts --- */
.post-password-form {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.post-password-form p { margin-bottom: 0.9rem; }
.post-password-form label { font-weight: 600; font-size: 0.85rem; color: var(--ink-2); }
.post-password-form input[type="password"] {
  display: block;
  width: 100%;
  max-width: 340px;
  margin-top: 0.35rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-family: inherit;
}
.post-password-form input[type="password"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}
.post-password-form input[type="submit"] {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

/* --- Search form (widget / block / get_search_form) --- */
.search-form,
.wp-block-search__inside-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.search-form label { flex: 1; margin: 0; }

.search-field,
.wp-block-search__input {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink-2);
  background: #fff;
  transition: all 0.2s;
}
.search-field:focus,
.wp-block-search__input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

.search-submit,
.wp-block-search__button {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A3D 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 1.1rem;
  min-height: 42px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.search-submit:hover,
.wp-block-search__button:hover { filter: brightness(1.05); }

/* --- Widgets (note sidebar = white cards, footer = dark) --- */
.widget { margin-bottom: 1.25rem; }
.widget:last-child { margin-bottom: 0; }

.widget ul,
.widget ol { list-style: none; padding: 0; margin: 0; }

.widget li { padding: 0.4rem 0; font-size: 0.88rem; }

.toc-card.widget li { border-bottom: 1px solid var(--line); }
.toc-card.widget li:last-child { border-bottom: none; }
.toc-card.widget a { color: var(--ink-2); text-decoration: none; }
.toc-card.widget a:hover { color: var(--orange); }
.toc-card.widget .children,
.toc-card.widget .sub-menu { padding-left: 1rem; }

.footer-dark .widget ul { margin-top: 0.5rem; }
.footer-dark .widget li { padding: 0.25rem 0; font-size: 0.875rem; }
.footer-dark .widget .search-field { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); color: #fff; }
.footer-dark .widget .search-field::placeholder { color: rgba(255, 255, 255, 0.5); }

.tagcloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tagcloud a {
  font-size: 0.8rem !important;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.2s;
}
.tagcloud a:hover { border-color: var(--orange); color: var(--orange); }
.footer-dark .tagcloud a { background: transparent; border-color: rgba(255, 255, 255, 0.2); color: inherit; }

.widget_calendar table { width: 100%; font-size: 0.82rem; text-align: center; }
.widget_calendar caption { caption-side: top; font-weight: 700; color: var(--ink-2); text-align: center; }
.widget_calendar th,
.widget_calendar td { padding: 0.3rem; }
.widget_calendar #today { background: var(--orange); color: #fff; border-radius: 6px; }

/* --- Sticky / format helpers that need no visual change but must not break layout --- */
.sticky,
.bypostauthor { position: relative; }

/* --- Reduced motion: keep smooth-scroll off for people who opt out --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
