/* ========== BLOG STYLES ========== */
/* Extends the EJH design system */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-blue: #667eea;
  --primary-purple: #764ba2;
  --text-dark: #1a1a2e;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --success: #28a745;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--bg-white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== NAVIGATION ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav-logo-text {
  font-weight: 700;
  font-size: 18px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-gray);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-blue);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary-blue);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #4f6ad0 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

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

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

/* ========== MOBILE MENU ========== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: white;
  padding: 16px;
  z-index: 999;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 16px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  background: var(--bg-light);
}

/* ========== BLOG HERO ========== */
.blog-hero {
  padding: 80px 0 40px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero p {
  font-size: 18px;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== BLOG LISTING ========== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  padding: 40px 0 80px;
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.blog-card-content {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
  color: var(--primary-blue);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.blog-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

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

.blog-card-excerpt {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.blog-card-meta .read-time {
  font-weight: 500;
}

/* ========== ARTICLE PAGE ========== */
.article-header {
  padding: 80px 0 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.article-header .breadcrumb {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.article-header .breadcrumb a {
  color: var(--primary-blue);
  text-decoration: none;
}

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

.article-header h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-gray);
}

.article-header .article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== ARTICLE BODY ========== */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-body h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 16px;
  color: var(--text-dark);
  line-height: 1.3;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text-dark);
}

.article-body p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #374151;
}

.article-body ul,
.article-body ol {
  margin: 0 0 24px 24px;
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--text-dark);
  font-weight: 600;
}

.article-body a {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-color: rgba(102,126,234,0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.article-body a:hover {
  text-decoration-color: var(--primary-blue);
}

.article-body .btn {
  text-decoration: none;
}

.article-body .btn-primary {
  color: white;
}

.article-body .btn-primary:hover {
  color: white;
}

.article-body blockquote {
  border-left: 4px solid var(--primary-blue);
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--bg-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-gray);
}

.article-body blockquote p {
  margin-bottom: 0;
}

/* ========== TABLE OF CONTENTS ========== */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 0 0 40px;
}

.toc h3 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  color: var(--text-dark);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
}

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

.toc a {
  color: var(--text-gray);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ========== CTAs ========== */
.cta-mid {
  margin: 40px 0;
  padding: 32px;
  background: linear-gradient(135deg, rgba(102,126,234,0.06) 0%, rgba(118,75,162,0.06) 100%);
  border: 1px solid rgba(102,126,234,0.15);
  border-radius: var(--radius-lg);
}

.cta-mid h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-dark);
}

.cta-mid p {
  font-size: 15px;
  color: var(--text-gray);
  margin-bottom: 16px;
}

.cta-mid .btn {
  padding: 10px 24px;
  font-size: 15px;
}

.cta-bottom {
  margin: 60px 0 0;
  padding: 48px 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
}

.cta-bottom h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  color: white;
}

.cta-bottom p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
  color: white;
}

.cta-bottom .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-bottom .btn-white {
  display: inline-block;
  padding: 12px 28px;
  background: white;
  color: #4f6ad0;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-bottom .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.cta-bottom .btn-outline-white {
  display: inline-block;
  padding: 12px 28px;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-bottom .btn-outline-white:hover {
  border-color: white;
  background: rgba(255,255,255,0.18);
}

/* ========== RELATED ARTICLES ========== */
.related-articles {
  margin: 60px 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--text-dark);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.related-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-blue);
}

.related-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.related-card h4 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.related-card h4 a:hover {
  color: var(--primary-blue);
}

.related-card p {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.5;
  margin: 0;
}

/* ========== FOOTER ========== */
.footer {
  padding: 60px 0 40px;
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
}

.footer h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav .container {
    padding: 0 16px;
  }

  .blog-hero {
    padding: 60px 0 24px;
  }

  .blog-hero h1 {
    font-size: 28px;
  }

  .blog-hero p {
    font-size: 16px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 60px;
  }

  .article-header {
    padding: 60px 0 24px;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .article-body {
    padding: 0 16px 60px;
  }

  .article-body h2 {
    font-size: 24px;
  }

  .article-body h3 {
    font-size: 20px;
  }

  .cta-bottom {
    padding: 32px 24px;
  }

  .cta-bottom h2 {
    font-size: 24px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .blog-card-content {
    padding: 20px;
  }

  .blog-card-title {
    font-size: 18px;
  }

  .article-header h1 {
    font-size: 24px;
  }

  .article-body p,
  .article-body ul,
  .article-body ol {
    font-size: 16px;
  }

  .cta-mid {
    padding: 24px;
  }

  .cta-bottom .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ========== ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
