/* ============================================================
   AQUILA360 — BLOG STYLES
   Covers: Blog Listing Page + Single Post Page
   ============================================================ */

/* ---- Blog Hero ---- */
.blog-hero {
  background: linear-gradient(135deg, #2d465b 0%, #1a2e3f 60%, #0f1e2b 100%);
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(31, 207, 179, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.blog-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(31, 207, 179, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.blog-hero .container {
  position: relative;
  z-index: 2;
}

.blog-hero h1 {
  color: #fff;
  font-size: 56px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.blog-hero h1 span {
  color: #1fcfb3;
}

.blog-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  max-width: 640px;
  margin-bottom: 0;
}

/* ---- Blog Search Bar ---- */
.blog-search-wrap {
  background: #fff;
  border-radius: 100px;
  padding: 8px 8px 8px 24px;
  display: flex;
  align-items: center;
  max-width: 560px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin-top: 36px;
}

.blog-search-wrap input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 16px;
  background: transparent;
  color: #212529;
}

.blog-search-wrap input::placeholder {
  color: #9aa0aa;
}

.blog-search-wrap button {
  background: #1fcfb3;
  border: none;
  border-radius: 100px;
  color: #fff;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.blog-search-wrap button:hover {
  background: #17b09a;
}

/* ---- Blog Stats Bar ---- */
.blog-stats-bar {
  background: rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0 0;
  margin-top: 40px;
}

.blog-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.blog-stat strong {
  color: #1fcfb3;
  font-size: 22px;
}

/* ---- Category Filter ---- */
.blog-filters {
  padding: 40px 0 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px;
}

.filter-tab {
  background: #fff;
  border: 1.5px solid #dee2e6;
  color: #495057;
  border-radius: 100px;
  padding: 7px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-tab:hover,
.filter-tab.active {
  background: #1fcfb3;
  border-color: #1fcfb3;
  color: #fff;
}

.filter-count {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 100px;
  padding: 1px 8px;
  font-size: 12px;
  margin-left: 4px;
}

.filter-tab.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ---- Blog Listing Grid ---- */
.blog-listing {
  padding: 60px 0;
  background: #f8f9fa;
  min-height: 500px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

/* ---- Blog Card ---- */
.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.blog-card-thumb {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2d465b 0%, #1fcfb3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-thumb.cat-inventory {
  background: linear-gradient(135deg, #1a3a5c, #1fcfb3);
}
.blog-card-thumb.cat-whatsapp {
  background: linear-gradient(135deg, #1e4d3a, #25d366);
}
.blog-card-thumb.cat-receivables {
  background: linear-gradient(135deg, #3a1a4d, #8b5cf6);
}
.blog-card-thumb.cat-wholesale {
  background: linear-gradient(135deg, #4d2a1a, #f97316);
}
.blog-card-thumb.cat-import {
  background: linear-gradient(135deg, #1a3a4d, #0ea5e9);
}
.blog-card-thumb.cat-odoo {
  background: linear-gradient(135deg, #4d1a1a, #ef4444);
}
.blog-card-thumb.cat-erp {
  background: linear-gradient(135deg, #2a3d1a, #84cc16);
}
.blog-card-thumb.cat-financial {
  background: linear-gradient(135deg, #1a2a4d, #3b82f6);
}
.blog-card-thumb.cat-hr {
  background: linear-gradient(135deg, #3d1a3d, #ec4899);
}

.blog-card-thumb .thumb-icon {
  font-size: 56px;
  opacity: 0.3;
}

/* SVG banner image inside listing card thumb */
.blog-card-thumb .card-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* show full SVG — gradient bg fills letterbox gaps */
  object-position: center;
  display: block;
}

.blog-card-thumb .category-badge {
  position: absolute;
  bottom: 14px;
  left: 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 100px;
  padding: 4px 12px;
}

.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #9aa0aa;
  margin-bottom: 12px;
}

.blog-card-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #dee2e6;
  flex-shrink: 0;
}

.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a2e3f;
  line-height: 1.4;
  margin-bottom: 12px;
  flex: 1;
}

.blog-card-excerpt {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f0f2f5;
}

.read-more-link {
  font-size: 14px;
  font-weight: 700;
  color: #1fcfb3;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

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

.read-time-badge {
  font-size: 12px;
  color: #9aa0aa;
  background: #f0f2f5;
  border-radius: 100px;
  padding: 3px 10px;
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 48px 0 0;
}

.page-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #dee2e6;
  background: #fff;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  background: #1fcfb3;
  border-color: #1fcfb3;
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- No Results ---- */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: #6c757d;
  display: none;
}

.no-results.visible {
  display: block;
}

.no-results h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #2d465b;
}

/* ---- Results Summary ---- */
.results-summary {
  font-size: 15px;
  color: #6c757d;
  margin-bottom: 24px;
  padding: 0 4px;
}

.results-summary strong {
  color: #2d465b;
}

/* ============================================================
   SINGLE BLOG POST PAGE
   ============================================================ */

.post-hero {
  background: linear-gradient(135deg, #2d465b 0%, #1a2e3f 100%);
  padding: 140px 0 60px;
  position: relative;
  overflow: hidden;
}

.post-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(31, 207, 179, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.post-hero .container {
  position: relative;
  z-index: 2;
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
}

.post-breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}

.post-breadcrumb a:hover {
  color: #1fcfb3;
}

.post-breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

.post-breadcrumb .current {
  color: rgba(255, 255, 255, 0.9);
}

.post-hero-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(31, 207, 179, 0.2);
  color: #1fcfb3;
  border: 1px solid rgba(31, 207, 179, 0.3);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
}

.post-hero h1 {
  color: #fff;
  font-size: 44px;
  line-height: 1.25;
  margin-bottom: 24px;
  max-width: 860px;
}

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

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.post-meta-item svg {
  opacity: 0.7;
}

/* ---- Post Layout ---- */
.post-layout {
  padding: 60px 0 80px;
  background: #f8f9fa;
}

.post-content-col {
  background: #fff;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden; /* clips banner bleed to rounded corners */
}

/* ---- Featured Banner (single post page) ---- */
.post-featured-banner {
  margin: -48px -48px 40px; /* bleed to card edges */
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  line-height: 0;
}

.post-featured-banner img {
  width: 100%;
  height: 360px; /* explicit height — makes object-fit effective */
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ---- Markdown Content Styles ---- */
.blog-content {
  font-size: 17px;
  line-height: 1.8;
  color: #2d3748;
}

.blog-content h2 {
  font-size: 30px;
  font-weight: 700;
  color: #1a2e3f;
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f4f8;
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #2d465b;
  margin: 36px 0 14px;
  line-height: 1.35;
}

.blog-content h4 {
  font-size: 18px;
  font-weight: 700;
  color: #2d465b;
  margin: 28px 0 10px;
}

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

.blog-content ul,
.blog-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.blog-content li {
  margin-bottom: 8px;
  font-size: 17px;
  color: #374151;
  line-height: 1.7;
  list-style: disc;
}

.blog-content ol li {
  list-style: decimal;
}

.blog-content strong {
  color: #1a2e3f;
  font-weight: 700;
}

.blog-content em {
  font-style: italic;
  color: #4a5568;
}

.blog-content blockquote {
  border-left: 4px solid #1fcfb3;
  background: linear-gradient(135deg, #f0fdf9, #fff);
  margin: 32px 0;
  padding: 20px 28px;
  border-radius: 0 12px 12px 0;
  font-size: 18px;
  color: #2d465b;
  font-style: italic;
}

.blog-content blockquote p {
  margin-bottom: 0;
  font-size: 18px;
  color: #2d465b;
}

.blog-content code {
  background: #f1f5f9;
  color: #e53e3e;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  font-family: "Courier New", monospace;
}

.blog-content pre {
  background: #1e2d3d;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 24px;
  overflow-x: auto;
  margin: 28px 0;
}

.blog-content pre code {
  background: transparent;
  color: #e2e8f0;
  padding: 0;
  font-size: 14px;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
}

.blog-content table th {
  background: #2d465b;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.blog-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  color: #374151;
}

.blog-content table tr:nth-child(even) td {
  background: #f8f9fa;
}

.blog-content table tr:hover td {
  background: #f0fdf9;
}

.blog-content a {
  color: #1fcfb3;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(31, 207, 179, 0.4);
}

.blog-content a:hover {
  color: #17b09a;
  text-decoration-color: rgba(31, 207, 179, 0.8);
}

.blog-content hr {
  border: none;
  border-top: 2px solid #f0f4f8;
  margin: 40px 0;
}

/* ---- Key Takeaway Box ---- */
.blog-content .key-takeaway,
.blog-content blockquote.key-takeaway {
  background: linear-gradient(135deg, #f0fdf9, #e6fff9);
  border-left: 4px solid #1fcfb3;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 32px 0;
}

/* ---- Post Sidebar ---- */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.sidebar-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1a2e3f;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f4f8;
}

/* ---- Table of Contents ---- */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  border-bottom: 1px solid #f5f7fa;
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: #4a5568;
  transition:
    color 0.2s,
    padding-left 0.2s;
}

.toc-list a:hover {
  color: #1fcfb3;
  padding-left: 6px;
  text-decoration: none;
}

/* ---- Author Card ---- */
.author-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d465b, #1fcfb3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.author-info .name {
  font-weight: 700;
  font-size: 15px;
  color: #1a2e3f;
  margin-bottom: 2px;
}

.author-info .role {
  font-size: 13px;
  color: #9aa0aa;
}

/* ---- CTA Sidebar Card ---- */
.cta-sidebar-card {
  background: linear-gradient(135deg, #2d465b 0%, #1a2e3f 100%);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
}

.cta-sidebar-card h4 {
  color: #fff;
  font-size: 18px;
  border-bottom: none;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.cta-sidebar-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  margin-bottom: 20px;
}

.cta-sidebar-card .btn {
  background: #1fcfb3;
  color: #fff;
  border: none;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: block;
}

.cta-sidebar-card .btn:hover {
  background: #17b09a;
}

/* ---- Related Tags ---- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  background: #f0f4f8;
  color: #4a5568;
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.tag-pill:hover {
  background: #1fcfb3;
  color: #fff;
  text-decoration: none;
}

/* ---- Related Posts ---- */
.related-posts-section {
  background: #fff;
  padding: 60px 0;
  border-top: 1px solid #e9ecef;
}

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

@media (max-width: 991px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Post Bottom CTA ---- */
.post-bottom-cta {
  background: linear-gradient(135deg, #2d465b 0%, #1a2e3f 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-bottom-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(31, 207, 179, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.post-bottom-cta .container {
  position: relative;
  z-index: 2;
}

.post-bottom-cta h2 {
  color: #fff;
  font-size: 36px;
  margin-bottom: 16px;
}

.post-bottom-cta h2 span {
  color: #1fcfb3;
}

.post-bottom-cta p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 32px;
}

.post-bottom-cta .btn-primary {
  background: #1fcfb3;
  border: none;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 100px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    background 0.2s,
    transform 0.2s;
  text-decoration: none;
}

.post-bottom-cta .btn-primary:hover {
  background: #17b09a;
  transform: translateY(-2px);
}

.post-bottom-cta .btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 100px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  text-decoration: none;
  margin-left: 12px;
}

.post-bottom-cta .btn-outline:hover {
  border-color: #1fcfb3;
  color: #1fcfb3;
}

/* ---- Loading / Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e4eaf0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  height: 380px;
  border-radius: 16px;
}

/* ---- Sticky TOC (large screens) ---- */
@media (min-width: 992px) {
  .post-sidebar-sticky {
    position: sticky;
    top: 100px;
  }
}

/* ---- Reading Progress Bar ---- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #1fcfb3;
  z-index: 9999;
  transition: width 0.1s;
}

/* ---- Share Buttons ---- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 2px solid #f0f4f8;
  margin-top: 40px;
}

.share-bar span {
  font-size: 14px;
  font-weight: 700;
  color: #4a5568;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid #dee2e6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  text-decoration: none;
  color: #4a5568;
}

.share-btn:hover {
  border-color: #1fcfb3;
  color: #1fcfb3;
  text-decoration: none;
}

/* ---- Responsive: Post Hero ---- */
@media (max-width: 768px) {
  .blog-hero h1 {
    font-size: 36px;
  }
  .post-hero h1 {
    font-size: 28px;
  }
  .post-content-col {
    padding: 28px 20px;
  }
  .blog-content h2 {
    font-size: 24px;
  }
  .blog-content h3 {
    font-size: 19px;
  }
  .blog-content p,
  .blog-content li {
    font-size: 16px;
  }
}

/* ---- Loading State ---- */
#blog-loading {
  text-align: center;
  padding: 80px 20px;
  color: #6c757d;
  font-size: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #dee2e6;
  border-top-color: #1fcfb3;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Post content loading ---- */
#post-loading {
  text-align: center;
  padding: 60px;
}

#post-error {
  text-align: center;
  padding: 60px;
  color: #e53e3e;
  display: none;
}
