/* ===== Blog Shared Styles — emergencyrecorder.com ===== */
/* Dark theme consistent with landing page */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --bg-0: #0a0a0a;
  --bg-1: #121212;
  --bg-2: #1a1a1a;
  --card: #1a1a2e;
  --card-soft: #171726;
  --line: #2a2a42;
  --text: #d4d4d8;
  --text-strong: #ffffff;
  --text-muted: #a1a1aa;
  --accent: #cc0000;
  --accent-2: #ff3333;
  --danger: #ff3333;
  --danger-soft: rgba(255,51,51,0.07);
  --danger-border: rgba(255,51,51,0.25);
  --success: #27c281;
  --success-soft: rgba(39,194,129,0.07);
  --success-border: rgba(39,194,129,0.3);
  --info: #4e8cff;
  --info-soft: rgba(78,140,255,0.07);
  --info-border: rgba(78,140,255,0.25);
  --warn: #ffb700;
  --warn-soft: rgba(255,183,0,0.07);
  --warn-border: rgba(255,183,0,0.25);
  --radius: 14px;
  --maxw: 780px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.blog-header {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.blog-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-strong);
  text-decoration: none;
}

.blog-logo:hover { text-decoration: none; }

.blog-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.blog-nav a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.blog-nav a:hover { color: var(--text-strong); }

.blog-nav .cta-small {
  padding: 7px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.blog-nav .cta-small:hover { filter: brightness(1.1); text-decoration: none; }

/* ===== ARTICLE ===== */
article.blog-post {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.blog-meta {
  margin-bottom: 24px;
}

.blog-meta .category {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,51,51,0.12);
  border: 1px solid rgba(255,51,51,0.35);
  color: #ffd0d0;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.blog-meta time {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

article.blog-post h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 16px;
}

article.blog-post h2 {
  font-size: 24px;
  line-height: 1.3;
  color: var(--text-strong);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

article.blog-post h3 {
  font-size: 20px;
  line-height: 1.3;
  color: var(--text-strong);
  margin: 32px 0 12px;
}

article.blog-post p {
  margin-bottom: 16px;
}

article.blog-post ul, article.blog-post ol {
  margin: 0 0 16px 20px;
}

article.blog-post li {
  margin-bottom: 6px;
}

article.blog-post strong {
  color: var(--text-strong);
}

/* ===== CALLOUT BOXES ===== */
.callout {
  padding: 16px 18px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 15px;
  line-height: 1.7;
}

.callout-danger {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  border-left: 4px solid var(--danger);
}

.callout-success {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-left: 4px solid var(--success);
}

.callout-info {
  background: var(--info-soft);
  border: 1px solid var(--info-border);
  border-left: 4px solid var(--info);
}

.callout-warn {
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  border-left: 4px solid var(--warn);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* ===== SAFETY BANNER (for DV articles) ===== */
.safety-banner {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  margin-bottom: 28px;
  text-align: center;
}

.safety-banner strong {
  color: var(--danger);
}

.safety-banner a {
  color: var(--danger);
  font-weight: 700;
}

/* ===== TABLE ===== */
.blog-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

article.blog-post table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

article.blog-post th, article.blog-post td {
  padding: 12px 14px;
  border-bottom: 1px solid #2b2d48;
  text-align: left;
  font-size: 15px;
}

article.blog-post th {
  background: #191a30;
  color: var(--text-strong);
  font-weight: 700;
  white-space: nowrap;
}

article.blog-post td {
  vertical-align: top;
}

/* ===== BLOCKQUOTE ===== */
article.blog-post blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent-2);
  background: rgba(255,51,51,0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}

/* ===== CHECKLIST ===== */
.checklist {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.checklist li {
  padding: 8px 0 8px 28px;
  position: relative;
}

.checklist li::before {
  content: "\2610";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-size: 18px;
}

/* ===== INLINE CTA ===== */
.inline-cta {
  margin: 32px 0;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,51,51,0.08), rgba(204,0,0,0.04));
  border: 1px solid rgba(255,51,51,0.3);
  text-align: center;
}

.inline-cta h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--text-strong);
}

.inline-cta p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-muted);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(204,0,0,0.25);
  transition: transform .2s, box-shadow .2s;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(204,0,0,0.35);
  text-decoration: none;
}

.friction {
  margin-top: 8px;
  font-size: 12px;
  color: #7a7a92;
}

/* ===== TOC ===== */
.toc {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.toc h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--text-strong);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc li {
  margin: 4px 0;
  font-size: 14px;
}

.toc a {
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--accent-2);
}

/* ===== FAQ ===== */
.faq-section { margin: 32px 0; }

.faq-section details {
  background: #141526;
  border: 1px solid #303357;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-strong);
  list-style: none;
  font-size: 15px;
}

.faq-section summary::-webkit-details-marker { display: none; }

.faq-section details p {
  margin: 8px 0 0;
  font-size: 15px;
}

/* ===== STEP CARDS ===== */
.step-cards {
  counter-reset: step;
  margin: 20px 0;
}

.step-card {
  padding: 18px 18px 18px 56px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  position: relative;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,51,51,0.2);
  border: 1px solid rgba(255,51,51,0.5);
  color: #ffdbdb;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
}

.step-card h4 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text-strong);
}

.step-card p {
  margin: 0;
  font-size: 15px;
}

/* ===== RELATED POSTS ===== */
.related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.related h3 {
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--text-strong);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.related-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}

.related-card:hover {
  border-color: rgba(255,51,51,0.4);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card .tag {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.related-card h4 {
  font-size: 15px;
  color: var(--text-strong);
  line-height: 1.3;
  margin: 0;
}

/* ===== BLOG INDEX PAGE ===== */
.blog-index {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.blog-index h1 {
  font-size: clamp(28px, 5vw, 40px);
  color: var(--text-strong);
  margin-bottom: 8px;
}

.blog-index .subtitle {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.post-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: rgba(255,51,51,0.4);
  transform: translateY(-3px);
  text-decoration: none;
}

.post-card .tag {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 8px;
}

.post-card h2 {
  font-size: 18px;
  color: var(--text-strong);
  line-height: 1.3;
  margin: 0 0 8px;
  border: none;
  padding: 0;
}

.post-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.post-card .read-more {
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 700;
}

/* ===== FOOTER ===== */
.blog-footer {
  padding: 24px 0;
  border-top: 1px solid #232338;
  text-align: center;
}

.blog-footer p {
  font-size: 12px;
  color: #4b5563;
}

.blog-footer a {
  color: #7a7a92;
  margin: 0 8px;
  font-size: 13px;
}

/* ===== VIDEO EMBED ===== */
.video-section { margin: 32px 0; }
.video-section h2 { border-bottom: none; margin-bottom: 16px; }
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.video-caption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  article.blog-post { padding: 32px 16px 60px; }
  article.blog-post h1 { font-size: 26px; }
  article.blog-post h2 { font-size: 20px; }
  .blog-header-inner { padding: 0 16px; }
  .blog-nav { gap: 10px; }
  .related-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
}
