/* ============================================================
   indiangadgetfinder.com - Main Stylesheet
   ============================================================ */

/* Font fallback to minimize CLS during font swap */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Segoe UI'), local('Roboto'), local('Helvetica Neue'), local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ============================================================
   1. CSS CUSTOM PROPERTIES & RESET
   ============================================================ */

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4a90e2;
  --accent: #ff6b35;
  --accent-dark: #e85520;
  --dark-bg: #1a1a2e;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #717171;
  --light-bg: #f8f9fa;
  --border: #e0e0e0;
  --success: #00c853;
  --danger: #ff1744;
  --warning: #ffc107;
  --info: #00bcd4;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
  --transition-slow: all 0.4s ease;
  --font-sans: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  --header-height: 64px;
  --sidebar-width: 320px;
  --container-max: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--light-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

strong, b { font-weight: 700; }
em, i { font-style: italic; }

small { font-size: 0.875rem; }

blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(26, 115, 232, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-light);
  font-size: 1.05rem;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--text-muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #c7254e;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

mark {
  background: rgba(255, 193, 7, 0.3);
  padding: 0.1em 0.2em;
  border-radius: 2px;
}

/* ============================================================
   3. LAYOUT - CONTAINER & GRID
   ============================================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.site-main {
  min-height: calc(100vh - var(--header-height));
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Content + Sidebar layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2rem;
  align-items: start;
}

.content-area {
  min-width: 0;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

/* ============================================================
   4. HEADER & NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--dark-bg);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.site-logo .logo-text span {
  color: var(--primary);
}

.site-logo:hover {
  color: var(--dark-bg);
  opacity: 0.85;
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.925rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(26, 115, 232, 0.08);
}

/* Dropdown */
.nav-item-dropdown {
  position: relative;
}

.nav-item-dropdown > a::after {
  content: ' ▾';
  font-size: 0.75rem;
  opacity: 0.7;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.dropdown-menu a:hover {
  background: var(--light-bg);
  color: var(--primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Search Bar */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  padding: 0.45rem 2.5rem 0.45rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  background: var(--light-bg);
  color: var(--text);
  width: 220px;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
  width: 260px;
}

.search-btn {
  position: absolute;
  right: 0.6rem;
  color: var(--text-muted);
  padding: 0.2rem;
  transition: var(--transition);
}

.search-btn:hover { color: var(--primary); }

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.search-suggestions.visible {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  color: var(--text);
}

.search-suggestion-item:hover,
.search-suggestion-item.highlighted {
  background: var(--light-bg);
  color: var(--primary);
}

.search-suggestion-item .suggestion-icon {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--light-bg);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  font-size: 1.1rem;
}

.dark-mode-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  gap: 5px;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  transition: var(--transition);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--card-bg);
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.mobile-nav.open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-list a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.mobile-nav-list a:hover {
  color: var(--primary);
  padding-left: 1rem;
}

.mobile-search {
  margin-bottom: 1.5rem;
}

.mobile-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: var(--light-bg);
  outline: none;
}

.mobile-search input:focus {
  border-color: var(--primary);
}

/* ============================================================
   5. HERO SECTION
   ============================================================ */

.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a73e8 100%);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 20%, rgba(26, 115, 232, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 107, 53, 0.2);
  color: #ff9a70;
  border: 1px solid rgba(255, 107, 53, 0.4);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  animation: fadeSlideUp 0.7s ease forwards;
}

.hero h1 .highlight {
  background: linear-gradient(90deg, #ff6b35, #ffc107);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  animation: fadeSlideUp 0.7s 0.1s ease both;
}

.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: fadeSlideUp 0.7s 0.2s ease both;
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.hero-search button {
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: var(--transition);
  white-space: nowrap;
}

.hero-search button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  animation: fadeSlideUp 0.7s 0.3s ease both;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  transition: var(--transition);
  cursor: pointer;
}

.hero-tag:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ============================================================
   6. POST CARDS
   ============================================================ */

.posts-section {
  padding: 3rem 0;
}

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

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 1rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.view-all {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.view-all:hover { gap: 0.5rem; }

/* Post Card */
.post-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--light-bg);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

/* post-card-category positioning handled by inline component styles */

.post-card-rating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffc107;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: var(--primary);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.author-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.post-card-date {
  margin-left: auto;
}

/* Featured Card (larger) */
.post-card.featured {
  grid-column: span 2;
}

.post-card.featured .post-card-image {
  aspect-ratio: 2 / 1;
}

.post-card.featured .post-card-title {
  font-size: 1.2rem;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.skeleton-image {
  aspect-ratio: 16/9;
  width: 100%;
}

.skeleton-body {
  padding: 1.25rem;
}

.skeleton-title {
  height: 1.2rem;
  width: 85%;
  margin-bottom: 0.5rem;
}

.skeleton-title-2 {
  height: 1.2rem;
  width: 65%;
  margin-bottom: 0.75rem;
}

.skeleton-line {
  height: 0.85rem;
  width: 100%;
  margin-bottom: 0.4rem;
}

.skeleton-line-short {
  height: 0.85rem;
  width: 60%;
  margin-bottom: 1rem;
}

.skeleton-meta {
  height: 0.75rem;
  width: 50%;
}

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

/* ============================================================
   7. POST / ARTICLE PAGE
   ============================================================ */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition);
}

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

.breadcrumb-sep {
  color: var(--border);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 500;
}

/* Post Header */
.post-header {
  margin-bottom: 2rem;
}

.post-category-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.post-meta-item svg,
.post-meta-item .meta-icon {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.post-meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-meta-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.reading-time {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.1s linear;
}

/* Featured Image */
.post-featured-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

/* Article Content */
.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 780px;
}

.article-content h2 {
  font-size: 1.7rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.article-content h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.article-content h4 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

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

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

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

.article-content li::marker {
  color: var(--primary);
}

/* Article Tables */
.article-content table,
.styled-table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-content th,
.styled-table th {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-content td,
.styled-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-content tr:nth-child(even),
.styled-table tr:nth-child(even) {
  background: var(--light-bg);
}

.article-content tr:hover td,
.styled-table tr:hover td {
  background: rgba(26, 115, 232, 0.04);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Image Caption */
.article-content figure {
  margin: 1.5rem 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Spec Box */
.spec-box {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.spec-box-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.spec-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* Pros / Cons */
.pros-cons-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.pros-box,
.cons-box {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid;
}

.pros-box {
  background: rgba(0, 200, 83, 0.05);
  border-color: rgba(0, 200, 83, 0.3);
  border-left: 4px solid var(--success);
}

.cons-box {
  background: rgba(255, 23, 68, 0.05);
  border-color: rgba(255, 23, 68, 0.25);
  border-left: 4px solid var(--danger);
}

.pros-box h4,
.cons-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.pros-box h4 { color: var(--success); }
.cons-box h4 { color: var(--danger); }

.pros-box ul,
.cons-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pros-box li,
.cons-box li {
  font-size: 0.9rem;
  padding: 0.3rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.pros-box li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.cons-box li::before {
  content: '✗';
  color: var(--danger);
  font-weight: 700;
  flex-shrink: 0;
}

/* Rating Box */
.rating-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.rating-box-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.rating-score-large {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.rating-score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stars-display {
  display: flex;
  gap: 0.2rem;
  font-size: 1.2rem;
  color: #ffc107;
  margin: 0.3rem 0;
}

.stars-display .star-empty {
  color: var(--border);
}

.rating-sub {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.rating-sub-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.rating-sub-label {
  min-width: 100px;
  color: var(--text-light);
}

.rating-progress {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rating-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

.rating-sub-score {
  min-width: 30px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-size: 0.875rem;
}

/* Price Box */
.price-box {
  background: linear-gradient(135deg, var(--dark-bg), #0f3460);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin: 2rem 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.price-box-info .price-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.price-box-info .price-amount {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.price-box-info .price-amount span {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.7;
  margin-right: 0.25rem;
}

.price-box-info .price-was {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
  margin-top: 0.2rem;
}

.price-box-info .price-discount {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: 0.5rem;
}

.price-box-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  text-align: center;
  justify-content: center;
}

.btn-buy:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
  color: #fff;
}

.btn-buy.amazon { background: #ff9900; }
.btn-buy.amazon:hover { background: #e68900; box-shadow: 0 8px 20px rgba(255, 153, 0, 0.4); }
.btn-buy.flipkart { background: #2874f0; }
.btn-buy.flipkart:hover { background: #1a5fcc; box-shadow: 0 8px 20px rgba(40, 116, 240, 0.4); }
.btn-buy.croma { background: #67b346; }
.btn-buy.reliance { background: #c0392b; }

/* Share Buttons */
.share-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--light-bg);
  border-radius: var(--radius-md);
}

.share-section h4 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 0.85rem;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }
.share-btn.copy-link { background: var(--text-muted); }
.share-btn.copy-link.copied { background: var(--success); }

/* Author Bio */
.author-bio {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

.author-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.author-bio-content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.author-bio-content .author-role {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.author-bio-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.author-social {
  display: flex;
  gap: 0.5rem;
}

.author-social a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.author-social a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tag-pill {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: var(--light-bg);
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.tag-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Table of Contents */
.toc {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  padding: 0.25rem 0;
  border-bottom: none;
}

.toc-list a {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--primary);
}

.toc-list a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: var(--transition);
}

.toc-list a.active::before {
  background: var(--primary);
}

.toc-list .toc-h3 { padding-left: 1rem; }
.toc-list .toc-h4 { padding-left: 2rem; }

/* Related Posts */
.related-posts {
  margin-top: 3rem;
}

/* ============================================================
   8. COMMENTS SECTION
   ============================================================ */

.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.comments-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

/* Comment Form */
.comment-form-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.comment-form-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
}

.form-control {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--light-bg);
  color: var(--text);
  transition: var(--transition);
  outline: none;
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.1);
}

.form-error-msg {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.25rem;
}

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

.char-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.25rem;
}

.char-counter.near-limit { color: var(--warning); }
.char-counter.at-limit { color: var(--danger); }

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

.comment {
  display: flex;
  gap: 1rem;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--primary);
  overflow: hidden;
}

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

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

.comment-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-action-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.comment-action-btn:hover {
  color: var(--primary);
}

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

.reply-form {
  display: none;
  margin-top: 1rem;
}

.reply-form.visible {
  display: block;
}

.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  margin-top: 1.5rem;
  font-family: inherit;
}

.load-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(26, 115, 232, 0.04);
}

/* ============================================================
   9. SIDEBAR
   ============================================================ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  max-height: calc(100vh - var(--header-height) - 2rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.widget {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.widget-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--light-bg);
}

.widget-body {
  padding: 1.25rem;
}

/* Popular Posts Widget */
.popular-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.popular-post-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  min-width: 28px;
}

.popular-post-info a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-post-info a:hover { color: var(--primary); }

.popular-post-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Category Widget */
.category-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.category-list-item:last-child { border-bottom: none; }

.category-list-item a {
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-list-item a:hover { color: var(--primary); }

.category-list-item .count {
  background: var(--light-bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  min-width: 28px;
  text-align: center;
}

/* Newsletter Widget */
.newsletter-form-widget .form-control {
  margin-bottom: 0.75rem;
}

.newsletter-form-widget p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Ad Widget */
.ad-widget {
  background: var(--light-bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
  padding: 0.4rem;
  border-bottom: 1px dashed var(--border);
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

/* ============================================================
   10. CATEGORY PAGE
   ============================================================ */

.category-header {
  background: linear-gradient(135deg, var(--dark-bg), var(--primary));
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
}

.category-header-content {
  color: #fff;
}

.category-header h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.category-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 0;
}

.category-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.category-stat {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.category-stat .stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
  color: #fff;
}

.category-stat .stat-label {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Filter/Sort Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  background: none;
  font-family: inherit;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sort-select {
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--card-bg);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--primary);
}

/* ============================================================
   11. AUTHOR PAGE
   ============================================================ */

.author-hero {
  background: linear-gradient(135deg, var(--dark-bg), #0f3460);
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.author-hero-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  color: #fff;
}

.author-hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.author-hero-info h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.author-hero-info .author-title {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.author-hero-info p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.author-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.author-stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.author-stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.author-stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   12. SEARCH PAGE
   ============================================================ */

.search-page-header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.search-page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.search-page-form {
  max-width: 600px;
  margin: 0 auto 2rem;
  display: flex;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.search-page-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
}

.search-page-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.search-page-form button {
  padding: 0.9rem 1.75rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: var(--transition);
}

.search-page-form button:hover { background: var(--primary-dark); }

.search-results-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.search-results-info strong {
  color: var(--text);
}

/* ============================================================
   13. STATIC PAGES (About, Contact, Privacy, Terms)
   ============================================================ */

.static-page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 0;
}

.static-page-content h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.page-intro {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.static-page-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.static-page-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--light-bg);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(26, 115, 232, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-text .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-info-text .value {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

/* FAQ Accordion */
.faq-list {
  margin-top: 1.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  font-family: inherit;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--light-bg);
  color: var(--primary);
}

.faq-question.open {
  background: rgba(26, 115, 232, 0.05);
  color: var(--primary);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-question.open .faq-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--card-bg);
}

.faq-answer.open {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ============================================================
   14. ADMIN PANEL
   ============================================================ */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f0f2f5;
}

.admin-sidebar {
  width: 240px;
  background: #1e2a3a;
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-sidebar-logo {
  padding: 1.25rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-sidebar-logo span {
  color: var(--accent);
}

.admin-nav-section {
  padding: 1rem 0.75rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  padding-left: 1rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  margin: 0.1rem 0.5rem;
  text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-nav-link.active {
  background: var(--primary);
  color: #fff;
}

.admin-nav-icon {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}

.admin-content {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}

.admin-topbar {
  background: #fff;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.admin-topbar h2 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 700;
}

.admin-main {
  padding: 1.75rem;
}

/* Dashboard Cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-left: 4px solid transparent;
}

.dashboard-card.primary { border-left-color: var(--primary); }
.dashboard-card.success { border-left-color: var(--success); }
.dashboard-card.warning { border-left-color: var(--warning); }
.dashboard-card.danger { border-left-color: var(--danger); }

.dashboard-card-info .card-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.dashboard-card-info .card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.dashboard-card.primary .dashboard-card-icon { background: rgba(26, 115, 232, 0.1); color: var(--primary); }
.dashboard-card.success .dashboard-card-icon { background: rgba(0, 200, 83, 0.1); color: var(--success); }
.dashboard-card.warning .dashboard-card-icon { background: rgba(255, 193, 7, 0.1); color: var(--warning); }
.dashboard-card.danger .dashboard-card-icon { background: rgba(255, 23, 68, 0.1); color: var(--danger); }

/* Admin Tables */
.admin-table-wrapper {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-table-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-table-header h3 {
  font-size: 1rem;
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  color: var(--text);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(26, 115, 232, 0.03);
}

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

.admin-table-image {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Admin Forms */
.admin-form-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-form-section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-form-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.admin-form-footer {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

/* Image Preview */
.image-preview-container {
  position: relative;
  margin-top: 0.75rem;
}

.image-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: none;
}

.image-preview.visible { display: block; }

/* Specs Editor */
.specs-editor,
.pros-cons-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.spec-row,
.pros-cons-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.spec-row:last-child,
.pros-cons-row:last-child { border-bottom: none; }

.spec-row input,
.pros-cons-row input {
  flex: 1;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--light-bg);
  outline: none;
}

.spec-row input:focus,
.pros-cons-row input:focus {
  border-color: var(--primary);
  background: #fff;
}

.remove-row-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 23, 68, 0.1);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  flex-shrink: 0;
}

.remove-row-btn:hover {
  background: var(--danger);
  color: #fff;
}

.add-row-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--light-bg);
  border: none;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
}

.add-row-btn:hover { background: rgba(26, 115, 232, 0.08); }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: rgba(0, 200, 83, 0.12); color: #00a046; }
.badge-danger { background: rgba(255, 23, 68, 0.12); color: #cc0033; }
.badge-warning { background: rgba(255, 193, 7, 0.15); color: #a07700; }
.badge-info { background: rgba(0, 188, 212, 0.12); color: #007a8c; }
.badge-secondary { background: var(--light-bg); color: var(--text-muted); }

/* ============================================================
   15. FOOTER
   ============================================================ */

.site-footer {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .site-logo {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.25rem;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.footer-social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links a::before {
  content: '›';
  color: var(--accent);
}

.footer-links a:hover {
  color: #fff;
  padding-left: 0.25rem;
}

.footer-newsletter input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.footer-newsletter input::placeholder { color: rgba(255, 255, 255, 0.4); }

.footer-newsletter input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.12);
}

.footer-newsletter p {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* Footer Bottom */
.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover { color: #fff; }

.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* ============================================================
   16. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

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

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #cc0033;
  border-color: #cc0033;
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

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

.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   17. AD PLACEMENTS
   ============================================================ */

.ad-container {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
  padding-top: 1.25rem;
}

.ad-container::before {
  content: 'Advertisements';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--card-bg);
  padding: 0 0.5rem;
}

.ad-container::after {
  content: '';
  position: absolute;
  top: 0.55rem;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: -1;
}

.ad-slot {
  display: inline-block;
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ad-slot-728 {
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
}

.ad-slot-300 {
  max-width: 300px;
  height: 250px;
  margin: 0 auto;
}

.ad-slot-970 {
  max-width: 970px;
  height: 90px;
  margin: 0 auto;
}

/* ============================================================
   18. TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  max-width: 360px;
  width: calc(100% - 3rem);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--text-muted);
  animation: slideInRight 0.3s ease;
  transition: var(--transition);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info { border-left-color: var(--primary); }

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error .toast-icon { color: var(--danger); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-info .toast-icon { color: var(--primary); }

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.toast-message {
  font-size: 0.825rem;
  color: var(--text-light);
  line-height: 1.4;
}

.toast-close {
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: var(--transition);
  font-family: inherit;
}

.toast-close:hover { color: var(--text); }

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

/* ============================================================
   19. LOADING SPINNER
   ============================================================ */

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   20. PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2.5rem;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--card-bg);
  transition: var(--transition);
  text-decoration: none;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   21. ANIMATIONS & KEYFRAMES
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   22. UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.uppercase { text-transform: uppercase; }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.desktop-only { display: initial; }
.mobile-only { display: none; }

/* Margins */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.w-full { width: 100%; }
.max-w-full { max-width: 100%; }

.rounded { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-hidden { overflow: hidden; }

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

/* ============================================================
   23. DARK MODE
   ============================================================ */

[data-theme="dark"] {
  --card-bg: #1e2130;
  --light-bg: #181926;
  --text: #e2e8f0;
  --text-light: #a0aec0;
  --text-muted: #718096;
  --border: #2d3748;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.35), 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] body {
  background-color: #13141f;
  color: var(--text);
}

[data-theme="dark"] .site-header {
  background: rgba(24, 25, 38, 0.9);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .site-header.scrolled {
  background: rgba(24, 25, 38, 0.98);
}

[data-theme="dark"] .site-logo {
  color: #fff;
}

[data-theme="dark"] .main-nav a {
  color: var(--text);
}

[data-theme="dark"] .search-input {
  background: #2d3748;
  border-color: #3d4a5c;
  color: var(--text);
}

[data-theme="dark"] .search-input:focus {
  background: var(--card-bg);
}

[data-theme="dark"] .dark-mode-toggle {
  background: #2d3748;
  border-color: #3d4a5c;
  color: var(--text);
}

[data-theme="dark"] .dropdown-menu {
  background: #1e2130;
  border-color: var(--border);
}

[data-theme="dark"] .search-suggestions {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .search-suggestion-item:hover {
  background: #2d3748;
}

[data-theme="dark"] .mobile-nav-panel {
  background: var(--card-bg);
}

[data-theme="dark"] .mobile-search input {
  background: #2d3748;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .widget,
[data-theme="dark"] .comment-form-wrapper,
[data-theme="dark"] .author-bio,
[data-theme="dark"] .rating-box,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .contact-form {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .post-card-title a {
  color: var(--text);
}

[data-theme="dark"] .form-control {
  background: #2d3748;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .form-control:focus {
  background: #374151;
}

[data-theme="dark"] .tag-pill {
  background: #2d3748;
  border-color: var(--border);
  color: var(--text-light);
}

[data-theme="dark"] .toc {
  background: #1e2130;
  border-color: var(--border);
}

[data-theme="dark"] .spec-box {
  background: #1e2130;
  border-color: var(--border);
}

[data-theme="dark"] .share-section {
  background: #1e2130;
}

[data-theme="dark"] .filter-bar {
  background: var(--card-bg);
}

[data-theme="dark"] .widget-header {
  background: #252740;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e2130 25%, #252740 50%, #1e2130 75%);
  background-size: 200% 100%;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text);
}

[data-theme="dark"] .admin-layout {
  background: #0f1117;
}

[data-theme="dark"] .admin-topbar {
  background: #1e2130;
  border-color: var(--border);
}

[data-theme="dark"] .admin-table-wrapper,
[data-theme="dark"] .admin-form-card,
[data-theme="dark"] .dashboard-card {
  background: var(--card-bg);
}

[data-theme="dark"] .admin-table th {
  background: #252740;
}

[data-theme="dark"] .toast {
  background: var(--card-bg);
}

[data-theme="dark"] .sort-select,
[data-theme="dark"] .filter-chip {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] code {
  background: rgba(255, 255, 255, 0.08);
  color: #f28779;
}

[data-theme="dark"] .faq-question {
  background: var(--card-bg);
  color: var(--text);
}

[data-theme="dark"] .faq-question:hover {
  background: #252740;
}

[data-theme="dark"] .faq-question.open {
  background: rgba(26, 115, 232, 0.08);
}

[data-theme="dark"] .faq-answer {
  background: var(--card-bg);
}

/* ============================================================
   24. RESPONSIVE STYLES
   ============================================================ */

/* 1200px */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1024px */
@media (max-width: 1024px) {
  :root { --sidebar-width: 280px; }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand { grid-column: span 2; }

  .author-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* 768px */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .main-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }

  .search-form { display: none; }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.3rem; }

  .hero { padding: 3.5rem 0 3rem; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .post-card.featured { grid-column: span 1; }

  .pros-cons-container { grid-template-columns: 1fr; }

  .spec-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }

  .author-hero-inner { flex-direction: column; text-align: center; }

  .author-stats-row { grid-template-columns: repeat(2, 1fr); }

  .rating-box-header { flex-direction: column; gap: 1rem; text-align: center; }

  .price-box {
    flex-direction: column;
    align-items: stretch;
  }

  .price-box-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dashboard-cards { grid-template-columns: 1fr 1fr; }

  .admin-sidebar { display: none; }

  .desktop-only { display: none; }
  .mobile-only { display: initial; }

  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }

  .back-to-top { bottom: 1rem; right: 1rem; }

  .share-buttons .share-btn {
    width: 44px;
    height: 44px;
  }
}

/* 480px */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  .hero h1 { font-size: 1.7rem; }
  .hero-search { border-radius: var(--radius-md); }
  .hero-search button { padding: 0.9rem 1rem; }

  .grid-4 { grid-template-columns: 1fr; }

  .post-card.featured { grid-column: span 1; }

  .author-stats-row { grid-template-columns: repeat(2, 1fr); }

  .dashboard-cards { grid-template-columns: 1fr; }

  .filter-bar { flex-direction: column; align-items: stretch; }

  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .author-bio { flex-direction: column; }
  .author-bio-avatar { width: 60px; height: 60px; }

  .toast-container { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }
}

/* ============================================================
   25. PRINT STYLES
   ============================================================ */

@media print {
  .site-header,
  .sidebar,
  .comments-section,
  .share-section,
  .ad-container,
  .ad-widget,
  .back-to-top,
  .reading-progress,
  .mobile-nav,
  .site-footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .article-content {
    max-width: 100%;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: '';
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .post-title {
    font-size: 22pt;
  }

  blockquote {
    border-left: 4px solid #333;
    padding-left: 1rem;
  }

  .pros-cons-container {
    grid-template-columns: 1fr 1fr;
  }

  pre {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
  }
}

/* ============================================================
   ACCESSIBILITY & PERFORMANCE
   ============================================================ */

/* Focus-visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reserve space for ad containers to prevent CLS */
.ad-banner-container {
  min-height: 250px;
  contain: layout size;
}
.ad-sidebar-container {
  min-height: 250px;
  width: 300px;
  max-width: 100%;
  contain: layout size;
}

/* Responsive video embeds */
.article-content iframe,
.post-content iframe {
  aspect-ratio: 16/9;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Off-screen rendering optimization */
.comments-section,
.related-posts {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}
