/* ==========================================================================
   Blog & Article Details Styles — Sky Tracker
   ========================================================================== */

/* Section Layout */
.blog-section {
  padding: 60px 0 80px;
  background-color: var(--bg-body, #f8fafc);
}

.blog-grid-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

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

/* Category Filter Bar */
.blog-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  scrollbar-width: thin;
}

.blog-filter-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.blog-filter-btn:hover,
.blog-filter-btn.active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Featured Blog Post Card */
.featured-blog-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.featured-blog-img {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.featured-blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.featured-blog-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.featured-blog-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 14px;
}

.featured-blog-content h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.featured-blog-content h2 a:hover {
  color: #dc2626;
}

.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 14px;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-meta i {
  color: #ef4444;
}

.featured-blog-content p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .featured-blog-card {
    grid-template-columns: 1fr;
  }
  .featured-blog-img {
    min-height: 200px;
  }
  .featured-blog-content {
    padding: 20px;
  }
  .featured-blog-content h2 {
    font-size: 1.3rem;
  }
}

/* Blog Post Grid (Listing) */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

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

/* Individual Blog Card */
.blog-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.blog-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5f9;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.06);
}

.blog-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
}

.blog-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 10px;
}

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

.blog-card__title a:hover {
  color: #dc2626;
}

.blog-card__excerpt {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-read-btn {
  color: #dc2626;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.blog-read-btn:hover {
  gap: 10px;
  color: #ef4444;
}

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

.widget-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ef4444;
  position: relative;
}

.search-form {
  position: relative;
}

.search-form input {
  width: 100%;
  padding: 12px 42px 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.search-form button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
}

.search-form button:hover {
  color: #dc2626;
}

/* Category List Widget */
.widget-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-categories li {
  margin-bottom: 10px;
}

.widget-categories li:last-child {
  margin-bottom: 0;
}

.widget-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.widget-categories a:hover {
  background: #fef2f2;
  color: #dc2626;
  padding-left: 18px;
}

.widget-categories span.count {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 50px;
  transition: all 0.2s ease;
}

.widget-categories a:hover span.count {
  background: #dc2626;
  color: #ffffff;
}

/* Recent Posts Widget */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.recent-post-img {
  width: 70px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
}

.recent-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 4px;
}

.recent-post-info h4 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.recent-post-info h4 a:hover {
  color: #dc2626;
}

.recent-post-date {
  font-size: 0.78rem;
  color: #64748b;
}

/* Sidebar Call to Action Banner */
.sidebar-cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sidebar-cta-banner::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.sidebar-cta-banner i.cta-icon {
  font-size: 2.2rem;
  color: #ef4444;
  margin-bottom: 12px;
}

.sidebar-cta-banner h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
}

.sidebar-cta-banner p {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 20px;
  line-height: 1.5;
}

.sidebar-cta-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-link:hover,
.page-link.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* ==========================================================================
   Blog Details Page (Single Post)
   ========================================================================== */

.article-header {
  margin-bottom: 28px;
}

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-top: 12px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 1.6rem;
  }
}

.article-featured-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  margin-bottom: 32px;
  max-height: 460px;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Social Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 32px;
}

.share-bar span {
  font-weight: 700;
  font-size: 0.9rem;
  color: #334155;
}

.share-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.share-btn--fb { background: #1877f2; }
.share-btn--wa { background: #25d366; }
.share-btn--ln { background: #0a66c2; }
.share-btn--copy { background: #64748b; }

/* Article Body Typography */
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #334155;
  background: #ffffff;
  padding: 36px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .article-body {
    padding: 20px;
  }
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-body p {
  margin-bottom: 18px;
}

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

.article-body li {
  margin-bottom: 10px;
}

.article-body blockquote {
  background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
  border-left: 4px solid #dc2626;
  padding: 20px 24px;
  border-radius: 8px;
  font-style: italic;
  font-size: 1.1rem;
  color: #1e293b;
  margin: 24px 0;
}

.article-callout {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.article-callout i {
  font-size: 1.5rem;
  color: #dc2626;
  margin-top: 2px;
}

.article-callout div h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.article-callout div p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #ffffff;
  padding: 24px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 40px;
}

.author-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid #fef2f2;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-details h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.author-details p.role {
  font-size: 0.85rem;
  color: #dc2626;
  font-weight: 600;
  margin-bottom: 8px;
}

.author-details p.bio {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0;
}

/* Related Posts Section */
.related-posts-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px dashed #e2e8f0;
}

.related-posts-section h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
}
