/* ---------------------------
   Blog / News Page Styles
   Extends style.css design system
---------------------------- */

/* ---------------------------
   Daily AI Article Section
---------------------------- */
.daily-article-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.daily-article-card {
  max-width: 860px;
  margin: 0 auto;
}

.daily-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #93c5fd;
  font-weight: 900;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-label i { color: #60a5fa; }

.daily-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.daily-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.daily-intro {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.75;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.daily-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.daily-section-heading {
  font-size: 1.1rem;
  font-weight: 900;
  color: #e2e8f0;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.daily-section-heading::before {
  content: '';
  display: block;
  width: 3px;
  height: 1em;
  background: linear-gradient(to bottom, var(--primary), var(--primary-2));
  border-radius: 999px;
  flex-shrink: 0;
}

.daily-section-body {
  color: #94a3b8;
  font-size: 0.97rem;
  line-height: 1.75;
  white-space: pre-line;
}

.daily-conclusion {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  color: #bfdbfe;
  font-size: 0.97rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.daily-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.daily-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.daily-tag {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
}

.daily-meta {
  font-size: 0.82rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.daily-meta i { color: #3b82f6; }

.daily-sources-toggle {
  width: 100%;
  margin-top: 1.25rem;
}

.sources-toggle-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: #64748b;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s;
}

.sources-toggle-btn:hover {
  color: #94a3b8;
  border-color: rgba(255,255,255,0.2);
}

.daily-sources-list {
  display: none;
  margin-top: 0.85rem;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}

.daily-sources-list.is-open { display: block; }

.daily-sources-list li {
  list-style: none;
  margin: 0.45rem 0;
}

.daily-sources-list a {
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.daily-sources-list a:hover { text-decoration: underline; }

/* ---------------------------
   Blog Hero
---------------------------- */
.blog-hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(ellipse 70% 60% at 75% 20%, rgba(37, 99, 235, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgba(10, 102, 194, 0.05), transparent),
    #fff;
}

.blog-hero-inner {
  max-width: 720px;
}

.blog-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0.85rem 0 0.75rem;
  color: var(--text);
}

.blog-subtitle {
  color: var(--subtext);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--subtext);
}

.source-badge i { color: var(--primary); }

/* ---------------------------
   Filter Bar
---------------------------- */
.blog-filter-bar {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 65px;
  z-index: 100;
  padding: 0.65rem 0;
}

.blog-filter-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--subtext);
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-tab:hover {
  border-color: #d1d5db;
  color: var(--text);
  transform: translateY(-1px);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.25);
}

.last-updated {
  font-size: 0.82rem;
  color: var(--subtext);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------
   Blog Content
---------------------------- */
.blog-content {
  padding: 2.5rem 0 3rem;
}

/* ---------------------------
   Featured Article
---------------------------- */
.featured-section {
  margin-bottom: 2rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 3px solid var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.featured-card-body {
  padding: 1.75rem;
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 102, 194, 0.10);
  color: var(--primary);
  border: 1px solid rgba(10, 102, 194, 0.18);
  font-weight: 900;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.featured-card h2 {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.featured-card h2:hover { color: var(--primary); }

.featured-card .article-excerpt {
  color: var(--subtext);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

.meta-item i { color: var(--primary); font-size: 0.8rem; }

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.read-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10, 102, 194, 0.3);
}

/* ---------------------------
   Articles Grid
---------------------------- */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

/* ---------------------------
   Article Card
---------------------------- */
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.article-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.78rem;
  border: 1px solid;
}

.article-tag.tag-ai {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}

.article-tag.tag-webdev {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.2);
}

.article-tag.tag-hn {
  background: rgba(245, 101, 26, 0.08);
  color: #f5651a;
  border-color: rgba(245, 101, 26, 0.2);
}

.article-tag.tag-general {
  background: rgba(10, 102, 194, 0.08);
  color: var(--primary);
  border-color: rgba(10, 102, 194, 0.2);
}

.article-score {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
}

.article-score i { color: #f59e0b; }

.article-card h3 {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.article-card h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.18s ease;
}

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

.article-card .article-excerpt {
  font-size: 0.92rem;
  color: var(--subtext);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 700;
}

.author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
}

.article-read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 0.82rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.article-read-link i { color: var(--primary); }

.article-read-link:hover {
  border-color: rgba(10, 102, 194, 0.3);
  background: rgba(10, 102, 194, 0.04);
  transform: translateY(-1px);
}

/* ---------------------------
   Skeleton Loaders
---------------------------- */
@keyframes shimmer {
  0%   { background-position: -700px 0; }
  100% { background-position: 700px 0; }
}

.skeleton-base {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 700px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 10px;
}

.skeleton-featured {
  height: 200px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 700px 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 700px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ---------------------------
   Load More
---------------------------- */
.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* ---------------------------
   Error State
---------------------------- */
.error-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--subtext);
}

.error-state i {
  font-size: 2.5rem;
  color: #ef4444;
  margin-bottom: 1rem;
}

.error-state h3 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.error-state p { margin-bottom: 1.5rem; }

/* ---------------------------
   Trusted Sources Section
---------------------------- */
.sources-section {
  background: var(--muted-bg);
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.sources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.source-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.source-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.source-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.source-icon.hn    { color: #f5651a; }
.source-icon.devto { color: #0a0a0a; }
.source-icon.web   { color: var(--primary); }
.source-icon.openai { color: #10a37f; }

.source-card h4 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.source-card p {
  font-size: 0.9rem;
  color: var(--subtext);
  line-height: 1.5;
}

/* ---------------------------
   Responsive
---------------------------- */
@media (min-width: 640px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .blog-title { font-size: 3.2rem; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card h2 { font-size: 2rem; }
}

@media (min-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
  .sources-grid { grid-template-columns: repeat(4, 1fr); }
}
