/**
 * Modern Blog Styles
 * ChopCoupons - Redesigned Blog Layout
 * Inspired by modern coupon sites like Dealhack
 */

/* ==========================================================================
   Blog Header
   ========================================================================== */
.blog-main {
  padding-top: 30px;
  padding-bottom: 60px;
  background: #f8f9fa;
}

.blog-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 40px 20px;
}

.blog-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 15px 0;
}

.blog-page-subtitle {
  font-size: 1.3rem;
  color: #555;
  margin: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Blog Grid - Card Layout
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

/* Featured (first) card spans full width - simple vertical layout */
.blog-card-featured {
  grid-column: 1 / -1;
}

.blog-card-featured .blog-card-image-wrap {
  height: 350px;
}

.blog-card-featured .blog-card-content {
  padding: 35px;
}

.blog-card-featured .blog-card-title {
  font-size: 2.2rem;
}

.blog-card-featured .blog-card-excerpt {
  font-size: 1.35rem;
}

/* ==========================================================================
   Blog Card Styles
   ========================================================================== */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Override for non-featured cards - ensure vertical layout */
.blog-card:not(.blog-card-featured) {
  display: flex;
  flex-direction: column;
}

.blog-card:not(.blog-card-featured) .blog-card-image-wrap {
  width: 100%;
  flex-shrink: 0;
}

.blog-card:not(.blog-card-featured) .blog-card-content {
  flex: 1;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.blog-card-image-wrap {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
}

.blog-card-image {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Ensure WordPress post thumbnail fills container */
.blog-card-image-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

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

.blog-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a9d9a 0%, #2c7873 100%);
  color: #fff;
}

.blog-card-placeholder i {
  font-size: 3rem;
  opacity: 0.7;
}

/* Hover Overlay */
.blog-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
  opacity: 1;
}

.blog-card-view {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-card-view i {
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-view i {
  transform: translateX(5px);
}

/* Reading Time Badge */
.blog-card-reading-time {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  z-index: 2;
}

/* Card Content */
.blog-card-content {
  padding: 25px;
}

/* Category Badge */
.blog-card-category {
  margin-bottom: 12px;
}

.blog-card-category a {
  display: inline-block;
  color: #4a9d9a;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  position: relative;
}

.blog-card-category a::before {
  content: "—";
  margin-right: 8px;
  color: #4a9d9a;
}

.blog-card-category a:hover {
  color: #2c7873;
}

/* Card Title */
.blog-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 18px 0;
  color: #1a1a2e;
}

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

.blog-card-title a:hover {
  color: #4a9d9a;
}

/* Card Excerpt */
.blog-card-excerpt {
  color: #444;
  font-size: 1.25rem;
  line-height: 1.7;
  margin: 0 0 20px 0;
}

/* Card Meta */
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 1.2rem;
  color: #555;
  font-weight: 500;
}

.blog-card-meta i {
  margin-right: 5px;
}

.blog-card-sticky {
  color: #e67e22;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.blog-pagination {
  text-align: center;
  padding: 20px 0;
}

.blog-pagination .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  margin: 0 4px;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.blog-pagination .page-numbers:hover {
  background: #4a9d9a;
  color: #fff;
}

.blog-pagination .page-numbers.current {
  background: #4a9d9a;
  color: #fff;
}

/* No Posts */
.blog-no-posts {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
}

.blog-no-posts i {
  font-size: 3rem;
  color: #adb5bd;
  margin-bottom: 20px;
}

.blog-no-posts h3 {
  color: #1a1a2e;
  margin: 0 0 10px 0;
}

.blog-no-posts p {
  color: #6c757d;
  margin: 0;
}

/* ==========================================================================
   Single Post Styles
   ========================================================================== */
.single-post-main {
  padding-top: 30px;
  padding-bottom: 60px;
  background: #f8f9fa;
}

.single-post-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.single-post-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.single-post-category {
  margin-bottom: 15px;
}

.single-post-category a {
  display: inline-block;
  color: #4a9d9a;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
}

.single-post-category a::before {
  content: "—";
  margin-right: 10px;
}

.single-post-category a::after {
  content: "—";
  margin-left: 10px;
}

.single-post-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.25;
  margin: 0 0 25px 0;
}

.single-post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 35px;
  color: #333;
  font-size: 1.4rem;
  font-weight: 500;
}

.single-post-meta i {
  margin-right: 12px;
  color: #4a9d9a;
  font-size: 1.2em;
}

.single-post-meta a {
  color: inherit;
  text-decoration: none;
}

.single-post-meta a:hover {
  color: #4a9d9a;
}

/* Article */
.single-post-article {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  margin-bottom: 30px;
}

.single-post-featured-image {
  width: 100%;
}

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

.single-post-content {
  padding: 40px;
  font-size: 1.25rem;
  line-height: 1.8;
  color: #333;
}

/* Larger text on desktop - 24px body text */
@media (min-width: 768px) {
  .single-post-content {
    font-size: 1.5rem;
    line-height: 1.85;
  }
}

.single-post-content h2 {
  color: #1a1a2e;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-size: 1.6rem;
  font-weight: 700;
}

.single-post-content h3 {
  color: #1a1a2e;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 1.35rem;
  font-weight: 600;
}

.single-post-content h4 {
  color: #1a1a2e;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  font-size: 1.15rem;
  font-weight: 600;
}

.single-post-content p {
  margin-bottom: 1.2em;
}

.single-post-content ul,
.single-post-content ol {
  margin-bottom: 1.2em;
  padding-left: 30px;
}

.single-post-content li {
  margin-bottom: 0.4em;
  line-height: 1.7;
}

.single-post-content a {
  color: #4a9d9a;
  text-decoration: underline;
}

.single-post-content a:hover {
  color: #2c7873;
}

.single-post-content blockquote {
  border-left: 4px solid #4a9d9a;
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: #555;
}

/* Tags */
.single-post-tags {
  padding: 25px 40px;
  border-top: 1px solid #eee;
  color: #6c757d;
}

.single-post-tags i {
  margin-right: 10px;
  color: #4a9d9a;
}

.single-post-tags a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.single-post-tags a:hover {
  color: #4a9d9a;
}

/* Share Buttons */
.single-post-share {
  padding: 25px 40px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 20px;
}

.share-label {
  color: #6c757d;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
  color: #fff;
}

.share-facebook {
  background: #1877f2;
}
.share-twitter {
  background: #1da1f2;
}
.share-linkedin {
  background: #0077b5;
}
.share-pinterest {
  background: #e60023;
}

/* Author Box */
.single-post-author-box {
  padding: 30px 40px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-avatar img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
}

.author-info {
  flex: 1;
}

.author-label {
  font-size: 0.8rem;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.author-name {
  margin: 5px 0 10px;
  font-size: 1.1rem;
}

.author-name a {
  color: #1a1a2e;
  text-decoration: none;
}

.author-name a:hover {
  color: #4a9d9a;
}

.author-bio {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */
.related-posts {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.related-posts-title {
  font-size: 1.3rem;
  color: #1a1a2e;
  margin: 0 0 25px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-post-card {
  text-align: center;
}

.related-post-image-wrap {
  display: block;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.related-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image {
  transform: scale(1.05);
}

.related-post-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a9d9a 0%, #2c7873 100%);
  color: #fff;
}

.related-post-placeholder i {
  font-size: 2rem;
  opacity: 0.7;
}

.related-post-title {
  font-size: 0.95rem;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.related-post-title a {
  color: #1a1a2e;
  text-decoration: none;
}

.related-post-title a:hover {
  color: #4a9d9a;
}

.related-post-date {
  font-size: 0.8rem;
  color: #adb5bd;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 991px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-card-featured .blog-card-image-wrap {
    height: 300px;
  }

  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

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

  .blog-card-featured .blog-card-image-wrap,
  .blog-card-image-wrap {
    height: 200px;
  }

  .blog-page-title {
    font-size: 1.8rem;
  }

  .single-post-title {
    font-size: 1.8rem;
  }

  .single-post-content {
    padding: 25px;
  }

  .single-post-share,
  .single-post-tags,
  .single-post-author-box {
    padding: 20px 25px;
  }

  .single-post-share {
    flex-direction: column;
    align-items: flex-start;
  }

  .single-post-author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

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

  .single-post-meta {
    flex-direction: column;
    gap: 10px;
  }
}
