/* ==============================================
   Blog-Specific Styles
   Linked from blog/index.html and blog post pages.
   Requires /styles.css loaded first for shared
   site styles (nav, footer, reset, typography)
   and CSS custom properties.
   ============================================== */

/* ---- Blog Hero ---- */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #002d5c 100%);
  color: white;
  padding: 60px 40px;
  text-align: center;
}

.blog-hero .date-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.blog-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  font-weight: 800;
  color: white;
}

.blog-hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 700px;
  margin: 0 auto;
  color: white;
}

/* ---- Blog Container ---- */
.blog-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 24px;
}

/* Narrower container for single-post pages */
.blog-container--narrow {
  max-width: 880px;
}

/* ---- Blog Grid (index page) ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

/* ---- Post Cards ---- */
.post-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.post-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #002d5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-card-image i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.25);
}

.post-card-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary-green);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Accessibility fix: #767676 meets WCAG AA 4.5:1 contrast on white */
.post-card-date {
  font-size: 0.82rem;
  color: #767676;
  margin-bottom: 10px;
  font-weight: 500;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
  line-height: 1.35;
}

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

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.9rem;
}

.post-card-link:hover {
  color: var(--primary-green);
  gap: 10px;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
  padding-bottom: 20px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.pagination-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #e0e0e0;
  color: #999;
}

.pagination-btn:disabled:hover {
  border-color: #e0e0e0;
  color: #999;
}

.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ---- Table of Contents ---- */
.toc {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px 36px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-card);
}

.toc h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--primary-blue);
}

.toc ol {
  padding-left: 24px;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
}

.toc a:hover {
  text-decoration: underline;
  color: var(--primary-green);
}

/* ---- Step Cards ---- */
.step-card {
  background: white;
  border-radius: 14px;
  padding: 0;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  border-bottom: 1px solid #e8edf2;
}

.step-number {
  background: var(--primary-blue);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
  font-family: var(--font-heading);
}

.step-header h2 {
  font-size: 1.35rem;
  color: var(--text-dark);
}

.step-body {
  padding: 28px 32px;
}

.step-body p {
  margin-bottom: 14px;
  color: var(--text-light);
}

/* ---- Action / Warning / Tip Boxes ---- */
.action-box {
  background: #e8f3ff;
  border-left: 4px solid var(--primary-blue);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 18px 0;
  font-weight: 500;
  color: var(--text-dark);
}

.action-box a {
  color: var(--primary-blue);
  font-weight: 700;
}

.action-box a:hover {
  color: var(--primary-green);
}

.warning-box {
  background: #fef3e0;
  border-left: 4px solid #f9a825;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 18px 0;
  color: var(--text-dark);
}

.warning-box strong {
  color: #e65100;
}

.tip-box {
  background: #ecfdf5;
  border-left: 4px solid var(--primary-green);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 18px 0;
  color: var(--text-dark);
}

.tip-box strong {
  color: var(--primary-green-dark);
}

.tip-box a {
  color: var(--primary-blue);
  font-weight: 600;
}

.tip-box a:hover {
  color: var(--primary-green);
}

/* ---- Visual Mocks ---- */
.visual-mock {
  background: #f8f9fb;
  border: 2px solid #dde3ea;
  border-radius: 10px;
  padding: 24px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  color: #444;
}

.visual-mock .title-bar {
  background: #e0e5ec;
  border-radius: 6px 6px 0 0;
  padding: 8px 14px;
  margin: -24px -24px 16px -24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visual-mock .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.visual-mock .dot.r { background: #ff5f57; }
.visual-mock .dot.y { background: #ffbd2e; }
.visual-mock .dot.g { background: #28c840; }

.visual-mock .url-bar {
  background: white;
  border-radius: 4px;
  padding: 4px 10px;
  margin-left: 12px;
  font-size: 0.8rem;
  color: #666;
  flex: 1;
}

.visual-mock .field {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 6px 0;
  display: block;
  width: 100%;
  color: #888;
}

.visual-mock .field.filled {
  color: var(--text-dark);
  border-color: var(--primary-blue);
}

.visual-mock .btn-mock {
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 24px;
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
}

.visual-mock .label {
  font-weight: 700;
  color: #333;
  margin-top: 12px;
  display: block;
}

.visual-mock .radio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.visual-mock .radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--primary-blue);
  display: inline-block;
}

.visual-mock .radio-dot.selected {
  background: var(--primary-blue);
  box-shadow: inset 0 0 0 3px white;
}

.visual-mock .chip {
  display: inline-block;
  background: #e8f3ff;
  color: var(--primary-blue);
  border-radius: 16px;
  padding: 4px 14px;
  margin: 4px 4px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---- Chips (outside visual mocks) ---- */
.chip {
  display: inline-block;
  background: #e8f3ff;
  color: var(--primary-blue);
  border-radius: 16px;
  padding: 4px 14px;
  margin: 4px 4px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---- Checklist ---- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

.checklist li {
  padding: 8px 0 8px 32px;
  position: relative;
  color: var(--text-light);
}

.checklist li::before {
  content: "\f0c8";
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  position: absolute;
  left: 4px;
  top: 8px;
  font-size: 1rem;
  color: var(--primary-blue);
}

/* ---- Link Buttons ---- */
.link-btn {
  display: inline-block;
  background: var(--primary-blue);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  margin: 8px 4px;
  transition: all 0.3s;
}

.link-btn:hover {
  background: #003366;
  transform: translateY(-2px);
}

.link-btn.secondary {
  background: var(--primary-green);
}

.link-btn.secondary:hover {
  background: var(--primary-green-dark);
}

.link-btn.outline {
  background: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.link-btn.outline:hover {
  background: var(--primary-blue);
  color: white;
}

/* ---- Time Estimate Badge ---- */
.time-est {
  display: inline-block;
  background: #ecfdf5;
  border-radius: 12px;
  padding: 3px 12px;
  font-size: 0.82rem;
  color: var(--primary-green-dark);
  margin-left: 8px;
  font-weight: 500;
}

/* ---- Blog CTA Banner ---- */
.blog-cta {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #002d5c 100%);
  border-radius: 14px;
  padding: 40px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-card);
}

.blog-cta h2 {
  color: white;
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.blog-cta p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.blog-cta .cta-btn {
  display: inline-block;
  background: var(--primary-green);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s;
}

.blog-cta .cta-btn:hover {
  background: var(--primary-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(22, 163, 74, 0.3);
}

/* ---- Breadcrumbs ---- */
.breadcrumb {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: var(--primary-blue);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--primary-green);
  text-decoration: underline;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #999;
}

.breadcrumb .current {
  color: var(--text-light);
}

/* ==============================================
   Mobile Responsive — Blog-specific
   ============================================== */
@media (max-width: 768px) {
  /* Blog hero */
  .blog-hero {
    padding: 40px 20px;
  }

  .blog-hero h1 {
    font-size: 1.6rem;
  }

  .blog-hero p {
    font-size: 1rem;
  }

  /* Blog container */
  .blog-container {
    padding: 20px 12px;
  }

  /* Blog grid */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .post-card-image {
    height: 160px;
  }

  /* Table of contents */
  .toc {
    padding: 20px;
  }

  /* Step cards */
  .step-header {
    padding: 16px 20px;
  }

  .step-body {
    padding: 20px;
  }

  /* Link buttons stack full-width */
  .link-btn {
    display: block;
    text-align: center;
    margin: 8px 0;
  }

  /* Blog CTA */
  .blog-cta {
    padding: 30px 20px;
  }

  .blog-cta h2 {
    font-size: 1.3rem;
  }

  /* Breadcrumbs */
  .breadcrumb {
    padding: 12px 16px;
    font-size: 0.8rem;
  }
}
