/* ============================================================
   Fixoor Blog — Apple HIG Redesign
   
   Design Principles:
   - Glass materials with layered translucency
   - SF Pro-like typography hierarchy (weight + size, not color)
   - 8pt spacing grid
   - Spring animations with natural easing
   - System grays, restrained accent colors
   - Floating cards with minimal borders
   - iOS-native component patterns
   ============================================================ */

:root {
  /* System Colors */
  --blog-bg: #F2F2F7;
  --blog-card: rgba(255,255,255,0.92);
  --blog-card-solid: #FFFFFF;
  --blog-text: #1C1C1E;
  --blog-text-secondary: #8E8E93;
  --blog-text-tertiary: #AEAEB2;
  --blog-blue: #007AFF;
  --blog-blue-light: rgba(0,122,255,0.08);
  --blog-green: #34C759;
  --blog-red: #FF3B30;
  --blog-orange: #FF9500;
  --blog-separator: rgba(60,60,67,0.08);
  --blog-separator-opaque: #C6C6C8;
  
  /* Glass Material */
  --glass-bg: rgba(255,255,255,0.72);
  --glass-blur: saturate(180%) blur(20px);
  --glass-border: rgba(255,255,255,0.5);
  --glass-shadow: 0 0 0 0.5px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  
  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1);
  
  /* Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  
  /* Motion — Spring-like */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.18s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;
  
  /* Layout */
  --max-width: 720px;
  --max-width-wide: 960px;
  --nav-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   DARK MODE — Manual Toggle + System Auto
   ============================================================ */

[data-theme="dark"] {
  --blog-bg: #000000;
  --blog-card: rgba(28,28,30,0.92);
  --blog-card-solid: #1C1C1E;
  --blog-text: #F5F5F7;
  --blog-text-secondary: #98989D;
  --blog-text-tertiary: #636366;
  --blog-blue: #0A84FF;
  --blog-blue-light: rgba(10,132,255,0.12);
  --blog-green: #30D158;
  --blog-red: #FF453A;
  --blog-orange: #FF9F0A;
  --blog-separator: rgba(84,84,88,0.35);
  --blog-separator-opaque: #38383A;
  --glass-bg: rgba(28,28,30,0.72);
  --glass-border: rgba(255,255,255,0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.25);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.35);
}

/* System auto dark mode */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"],
  :root:not([data-theme="light"]) {
    --blog-bg: #000000;
    --blog-card: rgba(28,28,30,0.92);
    --blog-card-solid: #1C1C1E;
    --blog-text: #F5F5F7;
    --blog-text-secondary: #98989D;
    --blog-text-tertiary: #636366;
    --blog-blue: #0A84FF;
    --blog-blue-light: rgba(10,132,255,0.12);
    --blog-green: #30D158;
    --blog-red: #FF453A;
    --blog-orange: #FF9F0A;
    --blog-separator: rgba(84,84,88,0.35);
    --blog-separator-opaque: #38383A;
    --glass-bg: rgba(28,28,30,0.72);
    --glass-border: rgba(255,255,255,0.08);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.2);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.25);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.35);
  }
}

/* Dark mode component overrides */
[data-theme="dark"] .blog-card-img,
:root:not([data-theme="light"]) .blog-card-img {
  background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 100%);
}

[data-theme="dark"] .blog-comment-avatar,
:root:not([data-theme="light"]) .blog-comment-avatar {
  background: linear-gradient(135deg, rgba(10,132,255,0.15) 0%, rgba(10,132,255,0.08) 100%);
}

[data-theme="dark"] .blog-comment-form input,
[data-theme="dark"] .blog-comment-form textarea,
:root:not([data-theme="light"]) .blog-comment-form input,
:root:not([data-theme="light"]) .blog-comment-form textarea {
  background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .blog-comment-form input:focus,
[data-theme="dark"] .blog-comment-form textarea:focus,
:root:not([data-theme="light"]) .blog-comment-form input:focus,
:root:not([data-theme="light"]) .blog-comment-form textarea:focus {
  background: rgba(10,132,255,0.06);
}

[data-theme="dark"] .blog-post-content,
:root:not([data-theme="light"]) .blog-post-content {
  color: #D1D1D6;
}

[data-theme="dark"] .blog-post-content code,
:root:not([data-theme="light"]) .blog-post-content code {
  background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .blog-share-btn.copy-link,
:root:not([data-theme="light"]) .blog-share-btn.copy-link {
  background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .blog-cat-btn,
:root:not([data-theme="light"]) .blog-cat-btn {
  background: rgba(28,28,30,0.92);
}

[data-theme="dark"] .blog-service-link,
:root:not([data-theme="light"]) .blog-service-link {
  background: #1C1C1E;
}

[data-theme="dark"] .blog-toast,
:root:not([data-theme="light"]) .blog-toast {
  background: rgba(44,44,46,0.92);
}

[data-theme="dark"] .blog-source-note,
:root:not([data-theme="light"]) .blog-source-note {
  background: rgba(255,159,10,0.08);
}

/* Dark mode admin sidebar override */
[data-theme="dark"] .admin-sidebar,
:root:not([data-theme="light"]) .admin-sidebar {
  background: #0A0A0A;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */

.blog-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--blog-text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.blog-theme-toggle:hover {
  background: rgba(0,0,0,0.04);
  color: var(--blog-text);
}

[data-theme="dark"] .blog-theme-toggle:hover {
  background: rgba(255,255,255,0.06);
}

.blog-theme-toggle:active {
  transform: scale(0.9);
}

.blog-theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s var(--ease-spring);
}

.blog-theme-toggle .icon-sun,
.blog-theme-toggle .icon-moon {
  display: none;
}

/* Auto (system) mode */
:root:not([data-theme="light"]):not([data-theme="dark"]) .blog-theme-toggle .icon-auto,
[data-theme="auto"] .blog-theme-toggle .icon-auto {
  display: block;
}

/* Light mode */
[data-theme="light"] .blog-theme-toggle .icon-sun {
  display: block;
}

/* Dark mode */
[data-theme="dark"] .blog-theme-toggle .icon-moon {
  display: block;
}

/* Auto mode: show sun in light, moon in dark */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .blog-theme-toggle .icon-sun,
  [data-theme="auto"] .blog-theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .blog-theme-toggle .icon-auto,
  [data-theme="auto"] .blog-theme-toggle .icon-auto {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .blog-theme-toggle .icon-moon,
  [data-theme="auto"] .blog-theme-toggle .icon-moon {
    display: block;
  }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .blog-theme-toggle .icon-auto,
  [data-theme="auto"] .blog-theme-toggle .icon-auto {
    display: none;
  }
}

/* ============================================================
   BASE RESET
   ============================================================ */

.blog * { margin: 0; padding: 0; box-sizing: border-box; }

.blog {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Yekan', system-ui, sans-serif;
  direction: rtl;
  background: var(--blog-bg);
  color: var(--blog-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.blog a { color: inherit; text-decoration: none; }
.blog img { display: block; max-width: 100%; }
.blog button { border: none; outline: none; background: none; font: inherit; cursor: pointer; }

/* ============================================================
   NAVIGATION — iOS Glass Bar
   ============================================================ */

.blog-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-height);
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 20px;
  padding-right: 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 0.5px solid var(--blog-separator);
}

.blog-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.blog-nav-brand img {
  width: 28px;
  height: 28px;
}

.blog-nav-brand .blog-badge {
  background: var(--blog-blue-light);
  color: var(--blog-blue);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: -0.1px;
}

.blog-nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.blog-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--blog-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.blog-nav-links a:hover,
.blog-nav-links a.active {
  color: var(--blog-blue);
}

/* ============================================================
   CONTAINER — Comfortable Reading Width
   ============================================================ */

.blog-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--safe-top) + 32px) 20px calc(80px + var(--safe-bottom));
}

/* ============================================================
   HERO — Clean, Confident
   ============================================================ */

.blog-hero {
  text-align: center;
  padding: 40px 0 28px;
}

.blog-hero h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  color: var(--blog-text);
}

.blog-hero p {
  font-size: 15px;
  font-weight: 400;
  color: var(--blog-text-secondary);
  line-height: 1.6;
}

/* ============================================================
   CATEGORIES — iOS Segmented Control Style
   ============================================================ */

.blog-categories {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 32px;
}

.blog-cat-btn {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--blog-card);
  color: var(--blog-text-secondary);
  border: none;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.blog-cat-btn:hover {
  color: var(--blog-text);
  box-shadow: var(--shadow-md);
}

.blog-cat-btn.active {
  background: var(--blog-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,122,255,0.3);
}

/* ============================================================
   FEATURED POST — Editorial Hero
   ============================================================ */

.blog-featured {
  display: block;
  background: var(--blog-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.blog-featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.blog-featured-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.blog-featured-body {
  padding: 28px 28px 32px;
}

.blog-featured .blog-tag {
  margin-bottom: 16px;
}

.blog-featured h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.blog-featured p {
  color: var(--blog-text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.blog-featured .blog-card-meta {
  border-top: 0.5px solid var(--blog-separator);
}

/* ============================================================
   POST GRID — Floating Cards
   ============================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--blog-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

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

.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #F0F0F5 0%, #E8E8ED 100%);
}

.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-body h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.2px;
  margin: 10px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-body .blog-excerpt {
  color: var(--blog-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 0.5px solid var(--blog-separator);
  font-size: 12px;
  color: var(--blog-text-tertiary);
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   TAG — Subtle Pill
   ============================================================ */

.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--blog-blue-light);
  color: var(--blog-blue);
  letter-spacing: -0.1px;
}

.blog-tag.green { background: rgba(52,199,89,0.1); color: var(--blog-green); }
.blog-tag.orange { background: rgba(255,149,0,0.1); color: var(--blog-orange); }
.blog-tag.red { background: rgba(255,59,48,0.1); color: var(--blog-red); }

/* ============================================================
   SINGLE POST — Editorial Reading
   ============================================================ */

.blog-post-hero {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
}

.blog-post-header {
  margin-bottom: 36px;
}

.blog-post-header h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin-bottom: 16px;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--blog-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.blog-post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Post Content — Clean Reading Typography */

.blog-post-content {
  line-height: 1.85;
  font-size: 16px;
  color: #333;
  letter-spacing: -0.1px;
}

.blog-post-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 36px 0 16px;
}

.blog-post-content h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 28px 0 12px;
}

.blog-post-content p {
  margin-bottom: 20px;
}

.blog-post-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.blog-post-content ul,
.blog-post-content ol {
  padding-right: 24px;
  margin-bottom: 20px;
}

.blog-post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-post-content blockquote {
  background: var(--blog-blue-light);
  border-right: 3px solid var(--blog-blue);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  color: var(--blog-text-secondary);
  font-style: italic;
  line-height: 1.7;
}

.blog-post-content code {
  background: rgba(0,0,0,0.04);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.blog-post-content pre {
  background: #1C1C1E;
  color: #F5F5F7;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
  direction: ltr;
  text-align: left;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.6;
}

/* ============================================================
   SERVICE LINKS — iOS-style CTAs
   ============================================================ */

.blog-service-links {
  background: linear-gradient(135deg, rgba(0,122,255,0.04) 0%, rgba(0,122,255,0.02) 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 36px 0;
  border: 0.5px solid rgba(0,122,255,0.1);
}

.blog-service-links h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-service-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--blog-card-solid);
  color: var(--blog-blue);
  font-weight: 600;
  font-size: 13px;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.blog-service-link:hover {
  background: var(--blog-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,122,255,0.3);
  transform: translateY(-1px);
}

.blog-service-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ============================================================
   SHARE BAR — Clean Actions
   ============================================================ */

.blog-share-bar {
  display: flex;
  gap: 10px;
  margin: 36px 0;
  padding: 20px 0;
  border-top: 0.5px solid var(--blog-separator);
  border-bottom: 0.5px solid var(--blog-separator);
  align-items: center;
}

.blog-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.blog-share-btn:active {
  transform: scale(0.95);
}

.blog-share-btn.twitter { background: rgba(29,161,242,0.1); color: #1DA1F2; }
.blog-share-btn.linkedin { background: rgba(10,102,194,0.1); color: #0A66C2; }
.blog-share-btn.whatsapp { background: rgba(37,211,102,0.1); color: #25D366; }
.blog-share-btn.copy-link { background: rgba(0,0,0,0.04); color: var(--blog-text); }

/* ============================================================
   COMMENTS — iMessage-inspired
   ============================================================ */

.blog-comments {
  margin-top: 48px;
}

.blog-comments h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-comments h2 .comment-count {
  background: var(--blog-blue-light);
  color: var(--blog-blue);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.blog-comment-form {
  background: var(--blog-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.blog-comment-form h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
}

.blog-comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-comment-form input,
.blog-comment-form textarea {
  width: 100%;
  border: none;
  outline: none;
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  transition: all var(--duration-fast) var(--ease-out);
  resize: vertical;
}

.blog-comment-form input:focus,
.blog-comment-form textarea:focus {
  background: rgba(0,122,255,0.04);
  box-shadow: 0 0 0 2px rgba(0,122,255,0.15);
}

.blog-comment-form textarea {
  min-height: 100px;
}

.blog-comment-form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--blog-text-secondary);
}

.blog-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--blog-blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: 0 2px 12px rgba(0,122,255,0.25);
  margin-top: 8px;
  cursor: pointer;
}

.blog-submit-btn:hover {
  filter: brightness(1.05);
}

.blog-submit-btn:active {
  transform: scale(0.97);
}

.blog-comment {
  background: var(--blog-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

.blog-comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.blog-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,122,255,0.1) 0%, rgba(0,122,255,0.05) 100%);
  color: var(--blog-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.blog-comment-info strong {
  font-weight: 600;
  font-size: 14px;
}

.blog-comment-info span {
  display: block;
  font-size: 12px;
  color: var(--blog-text-tertiary);
}

.blog-comment-body {
  font-size: 14px;
  line-height: 1.7;
  color: #48484A;
}

.blog-comment-reply {
  margin-right: 32px;
  border-right: 2px solid var(--blog-separator);
  padding-right: 16px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.blog-empty {
  text-align: center;
  padding: 80px 20px;
}

.blog-empty svg {
  margin: 0 auto 20px;
  opacity: 0.3;
}

.blog-empty h3 {
  font-weight: 600;
  margin-bottom: 8px;
}

.blog-empty p {
  color: var(--blog-text-secondary);
}

/* ============================================================
   PAGINATION — iOS-style
   ============================================================ */

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.blog-page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  background: var(--blog-card);
  color: var(--blog-text-secondary);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.blog-page-btn:hover {
  color: var(--blog-text);
  box-shadow: var(--shadow-md);
}

.blog-page-btn.active {
  background: var(--blog-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,122,255,0.3);
}

/* ============================================================
   FOOTER — Subtle
   ============================================================ */

.blog-footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--blog-text-tertiary);
  font-size: 13px;
  border-top: 0.5px solid var(--blog-separator);
  margin-top: 48px;
}

.blog-footer a {
  color: var(--blog-blue);
  font-weight: 500;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */

.blog-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 0.5px solid var(--blog-separator);
}

.blog-related h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 20px;
}

/* ============================================================
   SOURCE NOTE — Info Banner
   ============================================================ */

.blog-source-note {
  background: rgba(255,149,0,0.06);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--blog-orange);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
}

/* ============================================================
   TOAST — iOS-style Notification
   ============================================================ */

.blog-toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28,28,30,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-xl);
  animation: toastIn var(--duration-normal) var(--ease-spring),
             toastOut var(--duration-normal) var(--ease-out) 2.7s;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.95); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.95); }
}

/* ============================================================
   ANIMATIONS — Subtle Entrance
   ============================================================ */

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

.blog-card,
.blog-featured,
.blog-comment,
.blog-service-links {
  animation: fadeInUp var(--duration-slow) var(--ease-out);
}

/* Stagger grid children */
.blog-grid .blog-card:nth-child(1) { animation-delay: 0ms; }
.blog-grid .blog-card:nth-child(2) { animation-delay: 60ms; }
.blog-grid .blog-card:nth-child(3) { animation-delay: 120ms; }
.blog-grid .blog-card:nth-child(4) { animation-delay: 180ms; }
.blog-grid .blog-card:nth-child(5) { animation-delay: 240ms; }
.blog-grid .blog-card:nth-child(6) { animation-delay: 300ms; }

/* ============================================================
   SCROLLBAR — Hidden (iOS-like)
   ============================================================ */

.blog ::-webkit-scrollbar { width: 0; height: 0; }

/* ============================================================
   ADMIN — Premium Dark Mode
   ============================================================ */

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

.admin-sidebar {
  width: 260px;
  background: #1C1C1E;
  color: #F5F5F7;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  border-left: 0.5px solid rgba(255,255,255,0.06);
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
}

.admin-sidebar-brand img { width: 28px; height: 28px; }
.admin-sidebar-brand span { font-weight: 700; font-size: 17px; }

.admin-sidebar-brand .admin-badge {
  background: var(--blog-red);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.admin-nav { flex: 1; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: 2px;
}

.admin-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.admin-nav-item.active {
  background: var(--blog-blue);
  color: #fff;
}

.admin-nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.admin-nav-section {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  padding: 16px 12px 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-main {
  flex: 1;
  margin-right: 260px;
  padding: 32px;
  background: var(--blog-bg);
  min-height: 100vh;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-topbar h1 {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--blog-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.admin-stat-card h3 {
  font-size: 13px;
  color: var(--blog-text-secondary);
  margin-bottom: 8px;
}

.admin-stat-card .stat-value {
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -1px;
}

.admin-stat-card .stat-value.blue { color: var(--blog-blue); }
.admin-stat-card .stat-value.green { color: var(--blog-green); }
.admin-stat-card .stat-value.orange { color: var(--blog-orange); }

.admin-table-card {
  background: var(--blog-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 0.5px solid var(--blog-separator);
}

.admin-table-header h2 {
  font-weight: 600;
  font-size: 18px;
}

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

.admin-table th {
  text-align: right;
  padding: 12px 20px;
  font-size: 12px;
  color: var(--blog-text-secondary);
  font-weight: 600;
  border-bottom: 0.5px solid var(--blog-separator);
  background: rgba(0,0,0,0.02);
}

.admin-table td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 0.5px solid var(--blog-separator);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(0,0,0,0.015);
}

.admin-table .status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.admin-table .status-badge.published { background: rgba(52,199,89,0.1); color: var(--blog-green); }
.admin-table .status-badge.draft { background: rgba(255,149,0,0.1); color: var(--blog-orange); }

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.admin-action-btn.edit { background: rgba(0,122,255,0.08); color: var(--blog-blue); }
.admin-action-btn.delete { background: rgba(255,59,48,0.08); color: var(--blog-red); }
.admin-action-btn:hover { filter: brightness(0.95); }

.admin-form-card {
  background: var(--blog-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.admin-form-card h2 {
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 24px;
}

.admin-form-group {
  margin-bottom: 20px;
}

.admin-form-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--blog-text-secondary);
}

.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select {
  width: 100%;
  border: 0.5px solid var(--blog-separator-opaque);
  outline: none;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  transition: all var(--duration-fast) var(--ease-out);
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus {
  border-color: var(--blog-blue);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.admin-form-group textarea {
  min-height: 300px;
  resize: vertical;
  line-height: 1.8;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
  border: none;
}

.admin-btn.primary {
  background: var(--blog-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,122,255,0.25);
}

.admin-btn.primary:hover { filter: brightness(1.05); }

.admin-btn.secondary { background: rgba(0,0,0,0.04); color: var(--blog-text); }
.admin-btn.secondary:hover { background: rgba(0,0,0,0.06); }
.admin-btn.danger { background: var(--blog-red); color: #fff; }
.admin-btn:active { transform: scale(0.97); }

.admin-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--blog-bg);
}

.admin-login-card {
  background: var(--blog-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.admin-login-card img { width: 56px; margin: 0 auto 20px; }
.admin-login-card h1 { font-weight: 700; font-size: 24px; margin-bottom: 6px; }
.admin-login-card p { color: var(--blog-text-secondary); font-size: 14px; margin-bottom: 28px; }
.admin-login-card .admin-form-group { text-align: right; }

.admin-login-error {
  background: rgba(255,59,48,0.08);
  color: var(--blog-red);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.rss-item {
  background: var(--blog-card);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--duration-fast) var(--ease-out);
}

.rss-item:hover { box-shadow: var(--shadow-md); }

.rss-item-info { flex: 1; }
.rss-item-info h4 { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.rss-item-info p { font-size: 12px; color: var(--blog-text-secondary); }
.rss-item-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============================================================
   RESPONSIVE — Mobile-first
   ============================================================ */

@media (max-width: 768px) {
  .blog-nav-links { display: none; }
  .blog-hero h1 { font-size: 28px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-featured-img { height: 220px; }
  .blog-featured h2 { font-size: 22px; }
  .blog-featured-body { padding: 20px; }
  .blog-post-header h1 { font-size: 26px; }
  .blog-comment-form .form-row { grid-template-columns: 1fr; }
  .blog-share-bar { flex-wrap: wrap; }
  .admin-sidebar { display: none; }
  .admin-main { margin-right: 0; padding: 20px; }
  .admin-form-row { grid-template-columns: 1fr; }
  .blog-service-links-grid { flex-direction: column; }
  .blog-service-link { justify-content: center; }
  .blog-categories { gap: 6px; }
  .blog-cat-btn { padding: 6px 14px; font-size: 12px; }
}
