@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Raleway:wght@600;700;800;900&family=Roboto+Mono:wght@400;500;600&display=swap');

/* Blog Specific Theme & Article Layout Styles */
.blog-hero h1,
.hero-overlay h1,
.article-banner h1,
.article-body h2,
.article-body h3,
.article-body h4,
.blog-card h3,
.toc-title,
.author-bio-info h3,
.related-posts-title,
.newsletter-card h3 {
  font-family: "Raleway", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
}

body,
.article-body,
.blog-search-input,
.blog-tab,
.card-meta,
.article-byline,
.toc-list,
.card-readmore-btn {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.article-body code,
.article-body pre,
.article-body table th,
.article-body table td {
  font-family: "Roboto Mono", monospace;
  font-size: 0.92rem;
}

.blog-hero {
  background: linear-gradient(135deg, #090e17 0%, #1e293b 100%);
  color: #ffffff;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-overlay {
  max-width: 820px;
  margin: 0 auto;
}

.hero-overlay h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-overlay p {
  font-size: 1.12rem;
  color: #cbd5e1;
  max-width: 650px;
  margin: 0 auto 1.5rem;
}

/* Search Bar */
.blog-search-wrap {
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

.blog-search-input {
  width: 100%;
  padding: 0.85rem 1.2rem 0.85rem 2.8rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.blog-search-input::placeholder {
  color: #94a3b8;
}

.blog-search-input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.search-icon-jpg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  pointer-events: none;
}

/* Category Filter Tabs */
.blog-tabs-section {
  padding: 3rem 0 5rem;
}

.blog-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.blog-tab {
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.blog-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

.blog-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

/* Blog Cards Grid */
.blog-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.blog-card-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.card-cat-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #38bdf8;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-light);
}

.blog-card-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 0.65rem;
  transition: var(--transition);
}

.blog-card-body h3 a:hover {
  color: var(--primary);
}

.blog-card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
  flex: 1;
}

.card-readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
  transition: var(--transition);
}

.card-readmore-btn:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

/* ========================================================
   Single Article Detail Page Layout
   ======================================================== */
.article-banner {
  background: linear-gradient(135deg, #090e17 0%, #1e293b 100%);
  color: #ffffff;
  padding: 4rem 0 3rem;
}

.article-banner-inner {
  max-width: 860px;
  margin: 0 auto;
}

.article-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.article-banner h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
  font-weight: 600;
}

.author-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--primary-light);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  padding: 3.5rem 0 5rem;
  align-items: start;
}

.article-body {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.article-featured-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2.2rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-50);
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.6rem 0 0.7rem;
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 1.4rem;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.5rem 1.8rem;
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.75;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  font-size: 0.95rem;
}

.article-body th {
  background: #f1f5f9;
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-light);
}

.article-body td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  color: #475569;
}

.article-body tr:hover td {
  background: var(--primary-50);
}

.article-callout {
  background: #ecfdf5;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  margin: 1.8rem 0;
}

.article-callout h4 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.article-callout p {
  margin-bottom: 0;
  color: #065f46;
  font-size: 0.98rem;
}

/* Author Bio Card */
.author-bio-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin-top: 3rem;
}

.author-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary);
}

.author-bio-info h4 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.author-bio-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.author-bio-info p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 1.1rem;
  font-weight: 700;
}

.recent-posts-list {
  list-style: none;
}

.recent-posts-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.recent-posts-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-post-link {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.recent-post-link img {
  width: 70px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.recent-post-link span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  transition: var(--transition);
}

.recent-post-link:hover span {
  color: var(--primary);
}

@media screen and (max-width: 992px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  .article-body {
    padding: 1.5rem;
  }
  .author-bio-card {
    flex-direction: column;
    text-align: center;
  }
  .blog-grid-full {
    grid-template-columns: 1fr;
  }
}
