/* ===================================================
   AI Tool Radar – Blog Page Styles
   Shared CSS for all standalone blog article pages
   Apple-Minimalist Design System
   =================================================== */

:root {
  --bg: #fafbfc;
  --bg-card: #ffffff;
  --bg-card-hover: #f6f7f9;
  --surface: #f0f1f4;
  --border: #e2e4e9;
  --text: #111118;
  --text-dim: #3a3a44;
  --text-muted: #8b8b96;
  --accent: #5b6cf0;
  --accent-bright: #7b8af5;
  --accent2: #22c583;
  --accent3: #ef5350;
  --accent4: #ffb020;
  --accent5: #2196f3;
  --gradient1: linear-gradient(135deg, #2196f3 0%, #5b6cf0 100%);
  --gradient2: linear-gradient(135deg, #ef5350 0%, #ffb020 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.05);
  --shadow-btn: 0 4px 14px rgba(99,102,241,0.35), 0 8px 28px rgba(99,102,241,0.15);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise overlay (disabled) */
body::before { display: none; }

/* === BLOG HEADER (Glassmorphism) === */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,251,252,0.7);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
}

.blog-header a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.82rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-header a:hover {
  color: var(--accent);
}

.blog-header .logo-icon {
  width: 28px;
  height: 28px;
}

/* === ARTICLE LAYOUT === */
.blog-article {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* === ARTICLE HEADER ACCENT === */
.article-header-accent {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.article-header-accent::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gradient1);
  opacity: 0.25;
}

/* === TITLE & META === */
.blog-article h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  background: var(--gradient1);
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === ARTICLE BODY === */
.article-body h3 {
  font-size: 1.15rem;
  margin: 2.5rem 0 0.8rem;
  color: var(--text);
}

.article-body p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 0.8rem;
}

.article-body strong {
  color: var(--text);
}

.article-body ul,
.article-body ol {
  margin: 0.8rem 0 1.2rem 1.2rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.75;
}

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

.article-body li strong {
  color: var(--text);
}

/* === PROMPT EXAMPLES (good/bad) === */
.prompt-bad {
  background: rgba(239,83,80,0.08);
  border-left: 3px solid var(--accent3);
  padding: 0.8rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.5rem;
}

.prompt-good {
  background: rgba(34,197,131,0.08);
  border-left: 3px solid var(--accent2);
  padding: 0.8rem 1.2rem;
  border-radius: 0 8px 8px 0;
}

/* === CTAs === */
.article-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.article-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 1.4rem;
  border-radius: 99px;
  background: var(--gradient1);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  line-height: 1.3;
}

.article-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn);
}

/* === GLOSSAR TOOLTIPS === */
dfn[data-tooltip] {
  font-style: normal;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  cursor: help;
  position: relative;
}

dfn[data-tooltip]:hover::after,
dfn[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  white-space: normal;
  width: max-content;
  max-width: 260px;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: fadeUp 0.2s ease;
}

dfn[data-tooltip]:hover::before,
dfn[data-tooltip]:focus::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
  z-index: 50;
  pointer-events: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === SOCIAL SHARE === */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.share-bar span {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-right: 0.3rem;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.share-btn:hover {
  background: var(--text);
  color: #fff;
  transform: scale(1.08);
}

.share-btn.copied {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* === RELATED / MENTIONED TOOLS === */
.detail-related {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.detail-related h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.detail-related-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  color: var(--accent-bright);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.detail-related-link:hover { color: var(--accent); }

/* === AFFILIATE NOTE === */
.affiliate-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 1.2rem 2rem 2rem;
  max-width: 700px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

/* === FOOTER === */
.blog-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.blog-footer a {
  color: var(--accent-bright);
  text-decoration: none;
}

.blog-footer a:hover {
  text-decoration: underline;
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--accent-bright);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .blog-header { padding: 0.8rem 1.2rem; }
  .blog-article { padding: 1.5rem 1.2rem 3rem; }
  .blog-article h1 { font-size: 1.5rem; }

  dfn[data-tooltip]:hover::after,
  dfn[data-tooltip]:focus::after {
    left: 0;
    transform: none;
    max-width: 220px;
  }
  dfn[data-tooltip]:hover::before,
  dfn[data-tooltip]:focus::before {
    left: 1rem;
    transform: none;
  }
}

@media (max-width: 480px) {
  .blog-article h1 { font-size: 1.3rem; }
  .article-ctas { flex-direction: column; }
  .article-cta { text-align: center; justify-content: center; }
}

/* === FOCUS INDICATORS (Accessibility) === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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