/* ================================
   Blog Styles
   ================================ */

/* Blog Hero */
.blog-hero {
  padding: 80px 0 60px;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
}

.blog-hero h1 {
  color: white;
  font-size: clamp(36px, 5vw, 48px);
  margin-bottom: 16px;
}

.blog-hero p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
}

/* Blog Section */
.blog-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
}

/* Blog Cards */
.blog-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

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

.blog-card.featured {
  grid-column: span 2;
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.blog-card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: var(--bg-light);
}

.blog-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-badge {
  background: var(--gradient-primary);
  color: white;
}

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

.blog-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.blog-category {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.blog-date {
  color: var(--text-light);
  font-size: 14px;
}

.blog-card h2 {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.blog-card.featured h2 {
  font-size: 28px;
}

.blog-card p {
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.read-more {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.blog-card:hover .read-more {
  gap: 8px;
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 0;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
}

.newsletter-content h2 {
  color: white;
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 12px;
}

.newsletter-content > p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 16px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  outline: none;
}

.newsletter-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* Blog Post Page */
.post-header {
  padding: 60px 0 40px;
  background: var(--bg-light);
}

.post-header .container {
  max-width: 800px;
}

.post-title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.2;
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 20px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--text-dark);
}

.post-date {
  font-size: 14px;
  color: var(--text-light);
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-tag {
  padding: 4px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-medium);
}

.post-featured-image {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 60px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post Content */
.post-content {
  padding: 40px 0 80px;
}

.post-content .container {
  max-width: 800px;
}

.post-body {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-dark);
}

.post-body h2 {
  font-size: 32px;
  margin-top: 48px;
  margin-bottom: 24px;
}

.post-body h3 {
  font-size: 24px;
  margin-top: 36px;
  margin-bottom: 16px;
}

.post-body p {
  margin-bottom: 24px;
  color: var(--text-dark);
}

.post-body ul,
.post-body ol {
  margin-bottom: 24px;
  padding-left: 32px;
}

.post-body li {
  margin-bottom: 12px;
  color: var(--text-dark);
}

.post-body a {
  color: var(--primary-color);
  text-decoration: underline;
}

.post-body a:hover {
  color: var(--primary-dark);
}

.post-body img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 32px 0;
}

.post-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-medium);
}

.post-body code {
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
}

.post-body pre {
  background: var(--text-dark);
  color: white;
  padding: 24px;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 32px 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: white;
}

/* Info Box */
.info-box {
  background: rgba(255, 107, 53, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: 24px;
  border-radius: var(--border-radius);
  margin: 32px 0;
}

.info-box strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 8px;
}

/* Post Navigation */
.post-navigation {
  background: var(--bg-light);
  padding: 40px 0;
}

.post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.post-nav-item {
  background: var(--bg-white);
  padding: 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-nav-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-nav-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.post-nav-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.post-nav-item.next {
  text-align: right;
}

/* CTA in Post */
.post-cta {
  background: var(--gradient-primary);
  padding: 48px;
  border-radius: var(--border-radius);
  text-align: center;
  color: white;
  margin: 60px 0;
}

.post-cta h3 {
  color: white;
  font-size: 28px;
  margin-bottom: 16px;
}

.post-cta p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card.featured {
    grid-column: span 1;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }

  .post-nav-links {
    grid-template-columns: 1fr;
  }

  .post-nav-item.next {
    text-align: left;
  }

  .post-body {
    font-size: 16px;
  }

  .post-body h2 {
    font-size: 26px;
  }

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