/* ==========================================================================
   WOWMERCH BLOG MODULE - PREMIUM DESIGN SYSTEM
   ========================================================================== */

:root {
  --wm-primary: #0A1F44; /* Dark Blue */
  --wm-secondary: #FFB000; /* Yellow / Gold */
  --wm-accent-light: #F3F6FA; /* Light Blue/Gray for sections */
  --wm-bg: #FFFFFF;
  --wm-text-main: #334155; /* Slate 700 */
  --wm-text-light: #64748B; /* Slate 500 */
  --wm-border: #E2E8F0;
  
  --wm-radius-sm: 8px;
  --wm-radius-md: 12px;
  --wm-radius-lg: 20px;
  --wm-radius-pill: 50px;
  
  --wm-shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --wm-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --wm-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
  
  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
body {
  font-family: var(--font-body);
  color: var(--wm-text-main);
  background-color: var(--wm-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--wm-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

a {
  color: var(--wm-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--wm-secondary);
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.bg-light-gray { background-color: var(--wm-accent-light); }
.text-primary { color: var(--wm-primary) !important; }
.text-secondary { color: var(--wm-secondary) !important; }
.text-muted { color: var(--wm-text-light) !important; }

.section-padding { padding: 80px 0; }
@media (max-width: 768px) {
  .section-padding { padding: 50px 0; }
}

.rounded-lg { border-radius: var(--wm-radius-lg) !important; }
.shadow-md { box-shadow: var(--wm-shadow-md) !important; }

/* Buttons */
.wm-btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--wm-radius-pill);
  transition: var(--transition);
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
}

.wm-btn-primary {
  background-color: var(--wm-primary);
  color: #fff;
}
.wm-btn-primary:hover {
  background-color: #061530;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--wm-shadow-sm);
}

.wm-btn-secondary {
  background-color: var(--wm-secondary);
  color: var(--wm-primary);
}
.wm-btn-secondary:hover {
  background-color: #e59e00;
  color: var(--wm-primary);
  transform: translateY(-2px);
  box-shadow: var(--wm-shadow-sm);
}

.wm-btn-outline {
  background-color: transparent;
  color: var(--wm-primary);
  border-color: var(--wm-primary);
}
.wm-btn-outline:hover {
  background-color: var(--wm-primary);
  color: #fff;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.blog-hero {
  position: relative;
  background-color: var(--wm-primary);
  color: #fff;
  padding: 100px 0 80px;
  overflow: hidden;
  text-align: center;
}
.blog-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 176, 0, 0.15), transparent 50%);
  pointer-events: none;
}
.blog-hero h1 {
  color: #fff;
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.blog-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* ==========================================================================
   SEARCH & CATEGORY FILTERS
   ========================================================================== */
.blog-search-bar {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  transform: translateY(30px);
  z-index: 10;
}
.blog-search-bar input {
  width: 100%;
  padding: 18px 25px;
  border-radius: var(--wm-radius-pill);
  border: none;
  box-shadow: var(--wm-shadow-md);
  font-size: 1rem;
  outline: none;
  color: var(--wm-text-main);
}
.blog-search-bar button {
  position: absolute;
  right: 8px;
  top: 8px;
  height: calc(100% - 16px);
  width: 50px;
  border-radius: 50%;
  border: none;
  background: var(--wm-primary);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.blog-search-bar button:hover {
  background: var(--wm-secondary);
  color: var(--wm-primary);
}

/* Category Filter Pills */
.category-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 50px 0 30px;
}
.category-pill {
  padding: 8px 20px;
  background: #fff;
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--wm-text-main);
  transition: var(--transition);
  cursor: pointer;
}
.category-pill:hover, .category-pill.active {
  background: var(--wm-primary);
  color: #fff;
  border-color: var(--wm-primary);
}

/* ==========================================================================
   BLOG CARD (REUSABLE COMPONENT)
   ========================================================================== */
.blog-card {
  background: #fff;
  border-radius: var(--wm-radius-md);
  overflow: hidden;
  box-shadow: var(--wm-shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid transparent;
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--wm-shadow-hover);
  border-color: rgba(255, 176, 0, 0.3); /* Subtle secondary border on hover */
}
.blog-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img-wrap img {
  transform: scale(1.05);
}
.blog-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--wm-secondary);
  color: var(--wm-primary);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--wm-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}
.blog-card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--wm-text-light);
  margin-bottom: 12px;
}
.blog-meta i {
  color: var(--wm-secondary);
  margin-right: 5px;
}
.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.blog-card-title a {
  color: var(--wm-primary);
}
.blog-card-title a:hover {
  color: var(--wm-secondary);
}
.blog-card-text {
  font-size: 0.95rem;
  color: var(--wm-text-light);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--wm-border);
  padding-top: 15px;
}
.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.read-more i {
  transition: transform 0.3s ease;
}
.blog-card:hover .read-more i {
  transform: translateX(5px);
}
.blog-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-author img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.blog-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wm-primary);
}

/* ==========================================================================
   FEATURED POST (FIRST POST ON LISTING)
   ========================================================================== */
.featured-post .blog-card {
  flex-direction: row;
  align-items: center;
}
.featured-post .blog-card-img-wrap {
  width: 55%;
  aspect-ratio: 16/11;
}
.featured-post .blog-card-body {
  width: 45%;
  padding: 40px;
}
.featured-post .blog-card-title {
  font-size: 1.8rem;
}
@media (max-width: 991px) {
  .featured-post .blog-card {
    flex-direction: column;
  }
  .featured-post .blog-card-img-wrap, .featured-post .blog-card-body {
    width: 100%;
  }
}

/* ==========================================================================
   SINGLE BLOG ARTICLE
   ========================================================================== */
.single-article-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}
.single-article-title {
  font-size: 2.5rem;
  margin: 20px 0;
}
.single-article-meta {
  justify-content: center;
  font-size: 1rem;
}
.single-hero-img {
  width: 100%;
  border-radius: var(--wm-radius-lg);
  margin-bottom: 50px;
  box-shadow: var(--wm-shadow-md);
  max-height: 500px;
  object-fit: cover;
}

.article-content {
  font-size: 1.1rem;
  color: var(--wm-text-main);
}
.article-content h2 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
}
.article-content h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
}
.article-content p {
  margin-bottom: 25px;
}
.article-content ul, .article-content ol {
  margin-bottom: 25px;
  padding-left: 20px;
}
.article-content li {
  margin-bottom: 10px;
}
.article-content blockquote {
  border-left: 4px solid var(--wm-secondary);
  background: var(--wm-accent-light);
  padding: 20px 30px;
  font-style: italic;
  border-radius: 0 var(--wm-radius-sm) var(--wm-radius-sm) 0;
  margin: 30px 0;
  font-size: 1.2rem;
  color: var(--wm-primary);
}

/* Image inside article */
.article-content figure {
  margin: 40px 0;
}
.article-content figure img {
  border-radius: var(--wm-radius-md);
  box-shadow: var(--wm-shadow-sm);
  width: 100%;
}
.article-content figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--wm-text-light);
  margin-top: 10px;
}

/* Article Tags & Share */
.article-footer {
  border-top: 1px solid var(--wm-border);
  padding-top: 30px;
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.article-tags a {
  display: inline-block;
  background: var(--wm-accent-light);
  color: var(--wm-text-main);
  padding: 6px 15px;
  border-radius: var(--wm-radius-sm);
  font-size: 0.85rem;
  margin-right: 8px;
  margin-bottom: 8px;
}
.article-tags a:hover {
  background: var(--wm-primary);
  color: #fff;
}
.social-share {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-share span {
  font-weight: 600;
  color: var(--wm-primary);
}
.social-share a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--wm-accent-light);
  color: var(--wm-primary);
  font-size: 1.1rem;
}
.social-share a:hover {
  background: var(--wm-primary);
  color: #fff;
  transform: translateY(-3px);
}

/* Author Box */
.author-box {
  background: #fff;
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-md);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 50px 0;
  box-shadow: var(--wm-shadow-sm);
}
.author-box img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}
.author-box-content h4 {
  margin-bottom: 8px;
}
.author-box-content p {
  margin-bottom: 0;
  color: var(--wm-text-light);
  font-size: 0.95rem;
}

/* Next/Prev Navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 50px;
}
.post-nav-card {
  flex: 1;
  background: var(--wm-accent-light);
  padding: 20px;
  border-radius: var(--wm-radius-md);
  display: flex;
  flex-direction: column;
}
.post-nav-card.prev { text-align: left; }
.post-nav-card.next { text-align: right; }
.post-nav-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--wm-text-light);
  font-weight: 600;
  margin-bottom: 5px;
}
.post-nav-title {
  font-weight: 700;
  color: var(--wm-primary);
  font-size: 1.1rem;
}
.post-nav-card:hover .post-nav-title {
  color: var(--wm-secondary);
}

/* ==========================================================================
   SIDEBAR & WIDGETS
   ========================================================================== */
.blog-sidebar {
  padding-left: 30px;
}
@media (max-width: 991px) {
  .blog-sidebar { padding-left: 0; margin-top: 50px; }
}

.widget {
  background: #fff;
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-md);
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--wm-shadow-sm);
}
.widget-title {
  font-size: 1.25rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 12px;
}
.widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--wm-secondary);
  border-radius: 2px;
}

/* Recent Posts Widget */
.recent-post-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.recent-post-item:last-child { margin-bottom: 0; }
.recent-post-img {
  width: 80px;
  height: 80px;
  border-radius: var(--wm-radius-sm);
  object-fit: cover;
}
.recent-post-info h5 {
  font-size: 1rem;
  margin-bottom: 5px;
  line-height: 1.4;
}
.recent-post-date {
  font-size: 0.8rem;
  color: var(--wm-text-light);
}

/* Category Widget */
.widget-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget-categories li {
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--wm-border);
  padding-bottom: 12px;
}
.widget-categories li:last-child { border: none; padding-bottom: 0; margin-bottom: 0; }
.widget-categories a {
  display: flex;
  justify-content: space-between;
  color: var(--wm-text-main);
  font-weight: 500;
}
.widget-categories a:hover {
  color: var(--wm-primary);
  padding-left: 5px;
}
.widget-categories span {
  background: var(--wm-accent-light);
  color: var(--wm-primary);
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: var(--wm-radius-pill);
}

/* Tags Widget */
.widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.widget-tags a {
  padding: 6px 14px;
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius-pill);
  font-size: 0.85rem;
  color: var(--wm-text-main);
}
.widget-tags a:hover {
  background: var(--wm-primary);
  color: #fff;
  border-color: var(--wm-primary);
}

/* Table of Contents Widget (Sticky) */
.sticky-toc {
  position: sticky;
  top: 100px;
}
.toc-list {
  list-style: none;
  padding: 0;
}
.toc-list li {
  margin-bottom: 10px;
}
.toc-list a {
  color: var(--wm-text-light);
  font-size: 0.95rem;
  display: block;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s;
}
.toc-list a:hover, .toc-list a.active {
  color: var(--wm-primary);
  border-left-color: var(--wm-secondary);
  font-weight: 600;
}

/* ==========================================================================
   NEWSLETTER & CTA BANNER
   ========================================================================== */
.newsletter-section {
  background: var(--wm-primary);
  border-radius: var(--wm-radius-lg);
  padding: 60px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--wm-shadow-md);
  margin-top: 60px;
}
.newsletter-section::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 176, 0, 0.2), transparent 70%);
}
.newsletter-content {
  position: relative;
  z-index: 2;
}
.newsletter-content h3 {
  color: #fff;
  font-size: 2rem;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  max-width: 500px;
}
.newsletter-form input {
  flex: 1;
  padding: 15px 25px;
  border-radius: var(--wm-radius-pill);
  border: none;
  outline: none;
}
@media (max-width: 576px) {
  .newsletter-section { padding: 40px 20px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .wm-btn { width: 100%; }
}

.cta-banner {
  background: linear-gradient(135deg, var(--wm-primary), #0e2d63);
  padding: 80px 0;
  text-align: center;
  color: #fff;
  margin-top: 80px;
}
.cta-banner h2 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.blog-pagination {
  margin-top: 50px;
}
.blog-pagination .pagination {
  justify-content: center;
}
.blog-pagination .page-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 5px;
  border: 1px solid var(--wm-border);
  color: var(--wm-text-main);
  font-weight: 600;
  transition: var(--transition);
}
.blog-pagination .page-item.active .page-link,
.blog-pagination .page-link:hover {
  background: var(--wm-primary);
  color: #fff;
  border-color: var(--wm-primary);
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--wm-secondary);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
}
