/* ── Blog Index Specific Styles ── */

/* TICKER STRIP */
.ticker {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}
.ticker-inner {
  display: flex;
  animation: ticker 30s linear infinite;
  width: max-content;
}
.ticker-item {
  padding: 0 2rem;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  display: flex; align-items: center; gap: 0.4rem;
}
.ticker-item .sym { color: var(--muted); }
.ticker-item .up { color: var(--green); }
.ticker-item .down { color: var(--red); }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* SEARCH & FILTER */
.controls {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.search-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}
.search-icon {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 16px 50px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

.filters {
  display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: #8b5cf6;
  color: var(--text);
}
.filter-btn.active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
  font-weight: 600;
}

/* RESULTS COUNT */
.results-info {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  text-align: center;
}
.results-info span { color: #a78bfa; font-weight: 600; }

/* BLOG GRID */
.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

/* CARD */
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.blog-card.featured {
  grid-column: span 2;
}
@media(max-width: 800px) { .blog-card.featured { grid-column: span 1; } }

.card-img-wrap {
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
}
.blog-card.featured .card-img-wrap {
  aspect-ratio: 21/9;
}
@media(max-width: 800px) { .blog-card.featured .card-img-wrap { aspect-ratio: 16/9; } }

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.card-category {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(10,12,16,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}
.category-technical { color: #60a5fa; border-color: rgba(96,165,250,0.3); background: rgba(59,130,246,0.15); }
.category-fundamental { color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(139,92,246,0.15); }
.category-market { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.1); }
.category-beginners { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.1); }
.category-strategy { color: #f97316; border-color: rgba(249,115,22,0.3); background: rgba(249,115,22,0.1); }

.card-body { padding: 1.4rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-title {
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 0.7rem;
  color: #fff;
  font-weight: 700;
}
.blog-card:hover .card-title { color: #a78bfa; }
.card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #8b5cf6;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #fff;
}
.author-name { font-size: 0.8rem; font-weight: 500; color: #a1a1aa; }

.read-btn {
  color: #8b5cf6;
  font-size: 0.82rem;
  font-weight: 600;
}

/* SERIES SECTION (Restore if needed) */
.series-section { max-width: 1200px; margin: 4rem auto; padding: 0 24px; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.day-card { 
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; 
  padding: 1.2rem; text-decoration: none; display: flex; gap: 1rem; 
  transition: all .2s; 
}
.day-card:hover { border-color: #8b5cf6; transform: translateY(-2px); }
.day-num { 
  background: rgba(139,92,246,0.1); color: #8b5cf6; 
  width: 44px; height: 44px; border-radius: 8px; 
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800; flex-shrink: 0;
}
.day-num span { font-size: 0.5rem; text-transform: uppercase; opacity: 0.7; }
.day-title { color: #fff; font-size: 0.9rem; font-weight: 600; }

.filters {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--text);
}
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0c10;
  font-weight: 600;
}

/* RESULTS COUNT */
.results-info {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
.results-info span { color: var(--gold); font-weight: 600; }

/* BLOG GRID */
.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

/* CARD */
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: fadeUp 0.5s ease both;
  text-decoration: none;
  display: block;
}
.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(240,180,41,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(240,180,41,0.1);
}
.blog-card.featured {
  grid-column: span 2;
}
@media(max-width: 800px) { .blog-card.featured { grid-column: span 1; } }

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.blog-card:hover .card-img-wrap img {
  transform: scale(1.04);
}
.card-img-wrap {
  overflow: hidden;
  position: relative;
}
.card-img-wrap img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card.featured .card-img-wrap img {
  aspect-ratio: 21/9;
}

/* Gradient on image */
.card-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(20,23,31,0.8), transparent);
  pointer-events: none;
}

.card-category {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(10,12,16,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}
.category-technical { color: #60a5fa; border-color: rgba(96,165,250,0.3); background: rgba(59,130,246,0.15); }
.category-fundamental { color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(139,92,246,0.15); }
.category-market { color: var(--gold); border-color: rgba(240,180,41,0.3); background: rgba(240,180,41,0.1); }
.category-beginners { color: var(--green); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.1); }
.category-strategy { color: #f97316; border-color: rgba(249,115,22,0.3); background: rgba(249,115,22,0.1); }

.card-body { padding: 1.4rem; }

.card-meta {
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }
.card-meta .read-time {
  display: flex; align-items: center; gap: 4px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  line-height: 1.35;
  margin-bottom: 0.7rem;
  color: var(--text);
  transition: color 0.2s;
}
.blog-card:hover .card-title { color: var(--gold); }
.blog-card.featured .card-title { font-size: 1.6rem; }

.card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.card-author {
  display: flex; align-items: center; gap: 0.6rem;
}
.author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #0a0c10;
}
.author-name { font-size: 0.82rem; font-weight: 500; }

.read-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  transition: gap 0.2s;
}
.blog-card:hover .read-btn { gap: 10px; }

/* FEATURED BADGE */
.featured-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--gold);
  color: #0a0c10;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
}

/* NO RESULTS */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  display: none;
}
.no-results.show { display: block; }
.no-results h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.no-results p { color: var(--muted); font-size: 0.9rem; }

/* TICKER STRIP */
.ticker {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}
.ticker-inner {
  display: flex;
  animation: ticker 30s linear infinite;
  width: max-content;
}
.ticker-item {
  padding: 0 2rem;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  display: flex; align-items: center; gap: 0.4rem;
}
.ticker-item .sym { color: var(--muted); }
.ticker-item .up { color: var(--green); }
.ticker-item .down { color: var(--red); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SERIES SECTION */
.series-section { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; position: relative; z-index: 1; }
.series-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.series-badge-lg { background: linear-gradient(135deg, rgba(240,180,41,.15), rgba(240,180,41,.05)); border: 1px solid rgba(240,180,41,.4); color: var(--gold); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 8px 16px; border-radius: 20px; }
.series-title { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--text); }
.series-subtitle { color: var(--muted); font-size: .95rem; margin-top: .3rem; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.day-card { background: #111318; border: 1px solid #1e2330; border-radius: 12px; padding: 1.2rem 1.4rem; text-decoration: none; display: flex; align-items: flex-start; gap: 1rem; transition: border-color .2s, transform .15s; position: relative; overflow: hidden; }
.day-card:hover { border-color: rgba(240,180,41,.5); transform: translateY(-2px); }
.day-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); opacity: 0; transition: opacity .2s; }
.day-card:hover::before { opacity: 1; }
.day-num { background: rgba(240,180,41,.12); border: 1px solid rgba(240,180,41,.3); color: var(--gold); font-size: .7rem; font-weight: 800; min-width: 44px; height: 44px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; }
.day-num span { font-size: .55rem; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }
.day-content { flex: 1; min-width: 0; }
.day-cat { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.day-title { color: var(--text); font-size: .92rem; font-weight: 600; line-height: 1.35; }
.series-cta { margin-top: 2.5rem; text-align: center; }
.series-cta p { color: var(--muted); font-size: .9rem; }
.series-progress { background: #1e2330; border-radius: 99px; height: 4px; margin-bottom: 2rem; overflow: hidden; }
.series-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #f59e0b); border-radius: 99px; width: 100%; }
@media(max-width:600px) { .series-grid { grid-template-columns: 1fr; } }
