/**
 * TrafficsOne Blog Stylesheet
 * Aesthetic: Clean, High-Contrast White Blog Theme with Dark Header Accents
 */

:root {
  --blog-bg: #f8fafc;
  --blog-card-bg: #ffffff;
  --blog-border: #e2e8f0;
  --blog-text-dark: #0f172a;
  --blog-text-muted: #475569;
  --blog-text-light: #64748b;
  --blog-primary: #0284c7;
  --blog-primary-hover: #0369a1;
  --blog-accent-cyan: #06b6d4;
  --blog-accent-green: #10b981;
  --blog-dark-header: #050816;
  --blog-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --blog-shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.1);
  --radius-blog: 16px;
}

body.blog-body {
  background-color: var(--blog-bg);
  color: var(--blog-text-dark);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  padding-top: 80px;
}

/* Header Override for Blog */
.blog-header {
  background-color: rgba(5, 8, 22, 0.95);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
}

.blog-header .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-header .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
}

.blog-header .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-header .logo-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #050816;
  stroke-width: 2.5;
}

.blog-header .nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.blog-header .nav-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.blog-header .nav-link:hover,
.blog-header .nav-link.active {
  color: #22d3ee;
}

/* Hero Section / Banner */
.blog-hero {
  background: linear-gradient(180deg, #050816 0%, #0f172a 100%);
  color: #ffffff;
  padding: 60px 0 80px;
  text-align: center;
  position: relative;
}

.blog-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #22d3ee;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.blog-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.blog-hero p {
  color: #94a3b8;
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 32px;
}

/* AdSense Banner Containers */
.adsense-slot-container {
  background-color: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin: 28px 0;
  position: relative;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.adsense-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.adsense-dummy-content {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}

.adsense-sidebar-slot {
  min-height: 250px;
}

.adsense-sidebar-slot .adsense-dummy-content {
  max-width: 300px;
  height: 250px;
}

/* Search and Filters */
.blog-controls {
  max-width: 1240px;
  margin: -30px auto 40px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.blog-search-bar {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e2e8f0;
}

.blog-search-bar input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  color: var(--blog-text-dark);
  font-family: inherit;
}

.blog-categories {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.category-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--blog-text-muted);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.category-pill:hover,
.category-pill.active {
  background: var(--blog-primary);
  color: #ffffff;
  border-color: var(--blog-primary);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* Layout Grid */
.blog-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}

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

/* Article Cards Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.article-card {
  background: var(--blog-card-bg);
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-blog);
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.article-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #0f172a;
}

.article-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--blog-text-light);
  margin-bottom: 12px;
  font-weight: 600;
}

.article-category-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.article-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--blog-text-dark);
}

.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.article-title a:hover {
  color: var(--blog-primary);
}

.article-excerpt {
  color: var(--blog-text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--blog-border);
  padding-top: 16px;
  font-size: 0.85rem;
  color: var(--blog-text-light);
  font-weight: 500;
}

.read-more-link {
  color: var(--blog-primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more-link:hover {
  color: var(--blog-primary-hover);
}

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

.sidebar-widget {
  background: #ffffff;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-blog);
  padding: 24px;
  box-shadow: var(--blog-shadow);
}

.sidebar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blog-primary);
  color: var(--blog-text-dark);
}

.recent-posts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.recent-post-item img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.recent-post-info a {
  color: var(--blog-text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  display: block;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.recent-post-info a:hover {
  color: var(--blog-primary);
}

.recent-post-date {
  font-size: 0.78rem;
  color: var(--blog-text-light);
}

/* Single Post Specific Styles */
.single-post-header {
  margin-bottom: 32px;
}

.single-post-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--blog-text-dark);
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .single-post-title {
    font-size: 1.85rem;
  }
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--blog-text-light);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.featured-post-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-blog);
  margin-bottom: 36px;
  box-shadow: var(--blog-shadow);
}

.article-content {
  font-size: 1.08rem;
  color: #334155;
  line-height: 1.8;
}

.article-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blog-text-dark);
  margin: 40px 0 18px;
}

.article-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blog-text-dark);
  margin: 32px 0 14px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul, 
.article-content ol {
  margin: 0 0 24px 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--blog-primary);
  background: #f1f5f9;
  padding: 16px 24px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  margin: 28px 0;
  color: #1e293b;
}

/* FAQ Section in Articles */
.article-faq {
  margin-top: 48px;
  background: #ffffff;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-blog);
  padding: 32px;
  box-shadow: var(--blog-shadow);
}

.article-faq h2 {
  margin-top: 0;
  border-bottom: 2px solid var(--blog-primary);
  padding-bottom: 12px;
}

.faq-item {
  margin-bottom: 20px;
}

.faq-question {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blog-text-dark);
  margin-bottom: 6px;
}

.faq-answer {
  color: var(--blog-text-muted);
  font-size: 0.98rem;
}

/* Call to Action Box */
.article-cta-box {
  background: linear-gradient(135deg, #050816 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-blog);
  padding: 40px;
  text-align: center;
  margin: 48px 0;
  box-shadow: 0 20px 40px rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.article-cta-box h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 12px;
}

.article-cta-box p {
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 24px;
}

.cta-btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
  color: #050816;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.4);
}

/* Footer for Blog */
.blog-footer {
  background-color: #050816;
  color: #94a3b8;
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-footer .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  margin-top: 40px;
  text-align: center;
  font-size: 0.88rem;
}
