/* ============================================
   Blog Styles - Levitate Digital
   ============================================ */

/* Make header absolute (scrolls with page) on article pages */
body.blog-article #siteHeader {
  position: absolute !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.blog-article #siteHeader.scrolled {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Adjust article main padding-top since header is absolute */
body.blog-article .article-main {
  padding-top: 120px;
}

/* Blog Hero */
.blog-hero {
  padding: 140px 0 5rem;
  text-align: center;
  position: relative;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 80%);
  z-index: -1;
}

.blog-hero-content h1 {
  font-size: 3rem;
  margin: 1rem 0;
  line-height: 1.15;
}

.blog-hero-content p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-tag-hero {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--secondary-color);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Blog Grid */
.blog-section {
  padding: 2rem 0 6rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(0, 229, 255,0.1);
}

.blog-card-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-category {
  background: rgba(138, 43, 226, 0.15);
  border: 1px solid rgba(138, 43, 226, 0.3);
  color: #c084fc;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-read-time,
.blog-date {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.blog-card-title {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0;
}

.blog-card-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

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

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.blog-read-more {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: text-shadow 0.3s;
}

.blog-read-more:hover {
  text-shadow: 0 0 10px rgba(0, 229, 255,0.5);
}

/* Blog CTA Banner */
.blog-cta {
  padding: 3rem;
  text-align: center;
  margin-top: 2rem;
}

.blog-cta h3 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.blog-cta p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   Article Page Styles
   ============================================ */

.article-main {
  padding-top: 100px;
  padding-bottom: 5rem;
}

.article-container {
  max-width: 800px;
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
}

.breadcrumb a {
  color: var(--secondary-color);
  text-decoration: none;
}

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

.article-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.article-header {
  position: static !important;
  width: auto !important;
  height: auto !important;
  z-index: 1 !important;
  background: transparent !important;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2.5rem;
  margin-bottom: 2rem;
  transition: none !important;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.article-header h1 {
  font-size: 2.7rem;
  line-height: 1.3;
  margin-top: 1rem;
  margin-bottom: 1.8rem;
  font-weight: 800;
}

.article-lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
  border-right: 3px solid var(--secondary-color);
  padding-right: 1.2rem;
  margin: 1.5rem 0 0 0;
}

.article-section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.article-section h2 {
  font-size: 1.9rem;
  color: #fff;
  margin-top: 2rem !important;
  margin-bottom: 0.6rem !important;
  line-height: 1.35;
  font-weight: 700;
}

.article-section h3 {
  font-size: 1.4rem;
  color: var(--secondary-color);
  margin-top: 2.5rem !important;
  margin-bottom: 0.6rem !important;
  line-height: 1.4;
  font-weight: 700;
}

.article-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-section ul,
.article-section ol {
  padding-right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.article-section li strong {
  color: #fff;
}

.article-highlight {
  padding: 1.5rem 1.8rem;
  border-right: 3px solid var(--secondary-color);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-highlight strong {
  color: #fff;
}

/* Price Table */
.price-table {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.price-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  align-items: center;
}

.price-table-row:last-child {
  border-bottom: none;
}

.price-table-row.header {
  background: rgba(255,255,255,0.03);
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
}

.price-table-row .strikethrough {
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-table-row .our-price {
  color: var(--secondary-color);
  font-weight: 700;
}

/* Article CTA */
.article-cta {
  padding: 2.5rem;
  text-align: center;
}

.article-cta h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.article-cta p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Related Articles */
.related-articles {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.related-articles h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.related-card {
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.related-card h4 {
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
}

/* ============================================
   Blog Preview on Home Page
   ============================================ */

.blog-preview-section {
  padding: 5rem 0;
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.blog-preview-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.3s;
  text-decoration: none;
}

.blog-preview-card:hover {
  transform: translateY(-5px);
}

.blog-preview-card h3 {
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.4;
}

.blog-preview-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.blog-preview-link {
  color: var(--secondary-color);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .blog-grid,
  .blog-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Blog Listing Hero */
  .blog-hero {
    padding: 100px 0 3rem;
  }

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

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

  /* Grid layout for listing */
  .blog-grid,
  .blog-preview-grid,
  .related-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Article Details Page */
  body.blog-article .article-main {
    padding-top: 90px;
  }

  .breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .article-header {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .article-header h1 {
    font-size: 2rem;
    margin-top: 0.8rem;
    margin-bottom: 1.2rem;
  }

  .article-lead {
    font-size: 1.05rem;
    line-height: 1.7;
    padding-right: 0.8rem;
  }

  .article-content {
    gap: 2rem;
  }

  .article-section h2 {
    font-size: 1.55rem;
    margin-top: 1.6rem !important;
    margin-bottom: 0.4rem !important;
  }

  .article-section h3 {
    font-size: 1.25rem;
    margin-top: 1.8rem !important;
    margin-bottom: 0.4rem !important;
  }

  .article-section p {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .article-highlight {
    padding: 1.2rem 1.4rem;
    font-size: 0.95rem;
  }

  /* Scrollable Price Table on mobile */
  .price-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }

  .price-table-row {
    min-width: 480px;
    font-size: 0.82rem;
    padding: 0.75rem 1rem;
  }

  .blog-cta {
    padding: 2rem 1.5rem;
  }

  .article-cta {
    padding: 2rem 1.2rem;
  }

  .article-cta h3 {
    font-size: 1.4rem;
  }

  .article-cta > div {
    flex-direction: column;
    width: 100%;
  }

  .article-cta .btn {
    width: 100%;
    justify-content: center;
  }
}
