/* ===========================================
   Blog Tag Page Styles
   Unified design system for /blogs/tag/* pages
   =========================================== */

/* Hero Section */
.tag-hero {
  background: linear-gradient(135deg, #0a2540 0%, #1a365d 50%, #0d4a6e 100%);
  padding: 60px 0 50px;
}

.tag-hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
}

.tag-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.tag-hero-back:hover {
  color: #fff;
}

.tag-hero-back svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.tag-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-hero-badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tag-hero h1 {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
}

.tag-hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

/* Main Container */
.tag-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.tag-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 992px) {
  .tag-layout {
    grid-template-columns: 1fr 300px;
  }
}

.tag-count {
  font-size: 15px;
  color: #666;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.tag-count strong {
  color: #140F3B;
}

/* Article Cards */
.tag-articles {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tag-article-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tag-article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.tag-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.tag-article-meta svg {
  width: 14px;
  height: 14px;
  fill: #999;
  margin-right: 4px;
  vertical-align: -2px;
}

.tag-article-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
}

.tag-article-card h2 a {
  color: #140F3B;
  text-decoration: none;
  transition: color 0.2s;
}

.tag-article-card h2 a:hover {
  color: #667eea;
}

.tag-article-excerpt {
  color: #555;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 16px;
}

.tag-article-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f46e5;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: gap 0.2s;
}

.tag-article-link:hover {
  gap: 10px;
}

.tag-article-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Sidebar Widgets */
.tag-sidebar-widget {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 24px;
  margin-bottom: 24px;
}

.tag-sidebar-widget:last-child {
  margin-bottom: 0;
}

.tag-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #140F3B;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #667eea;
}

.tag-sidebar-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-sidebar-tags li a {
  display: inline-block;
  padding: 8px 14px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}

.tag-sidebar-tags li a:hover {
  background: #667eea;
  color: #fff;
}

.tag-sidebar-tags li a.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* CTA Widget */
.tag-sidebar-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.tag-sidebar-cta .tag-sidebar-title {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.3);
}

.tag-sidebar-cta p {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.tag-sidebar-cta-btn {
  display: inline-block;
  background: #fff;
  color: #4f46e5;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tag-sidebar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===========================================
   Mobile Responsive Styles
   =========================================== */

@media (max-width: 991px) {
  .tag-layout {
    gap: 32px;
  }

  .tag-container {
    padding: 32px 16px 60px;
  }
}

@media (max-width: 768px) {
  .tag-hero {
    padding: 40px 0 30px;
  }

  .tag-hero-content {
    padding: 0 16px;
  }

  .tag-hero h1 {
    font-size: 32px;
  }

  .tag-hero-subtitle {
    font-size: 16px;
  }

  .tag-article-card {
    padding: 20px;
  }

  .tag-article-card h2 {
    font-size: 18px;
  }

  .tag-article-excerpt {
    font-size: 14px;
  }

  .tag-article-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .tag-hero {
    padding: 32px 0 24px;
  }

  .tag-hero h1 {
    font-size: 26px;
  }

  .tag-hero-subtitle {
    font-size: 15px;
  }

  .tag-hero-badge {
    font-size: 12px;
    padding: 6px 12px;
  }

  .tag-article-card {
    padding: 16px;
  }

  .tag-article-card h2 {
    font-size: 17px;
  }

  .tag-sidebar-widget {
    padding: 20px;
  }
}

/* ===========================================
   Dark Mode
   =========================================== */

@media (prefers-color-scheme: dark) {
  body {
    background: #0f172a;
    color: #e2e8f0;
  }

  .tag-article-card {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  }

  .tag-article-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }

  .tag-article-card h2 a {
    color: #f1f5f9;
  }

  .tag-article-card h2 a:hover {
    color: #818cf8;
  }

  .tag-article-excerpt {
    color: #94a3b8;
  }

  .tag-article-meta {
    color: #64748b;
  }

  .tag-article-meta svg {
    fill: #475569;
  }

  .tag-article-link {
    color: #a5b4fc;
  }

  .tag-count {
    color: #94a3b8;
    border-bottom-color: #334155;
  }

  .tag-count strong {
    color: #f1f5f9;
  }

  .tag-sidebar-widget {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  }

  .tag-sidebar-title {
    color: #f1f5f9;
  }

  .tag-sidebar-tags li a {
    background: #334155;
    color: #cbd5e1;
  }

  .tag-sidebar-tags li a:hover {
    background: #667eea;
    color: #fff;
  }
}
