/* Language Bazaar Blog - Modern Design */
/* Inspired by Notion, Linear, Stripe blog patterns */

/* ===== Base ===== */
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  margin: 0;
  padding: 0;
  background: #f8fafb;
  min-height: 100vh;
  color: #1a2b3c;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header - matches lesson page teal ===== */
.header {
  background: linear-gradient(135deg, #2c7a7b 0%, #2d5f5d 100%);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo img {
  height: 30px;
  width: auto;
}

@media (min-width: 768px) {
  .header-logo img { height: 34px; }
}

.header-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-nav .btn {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}

.header-nav .btn:hover {
  background: rgba(255,255,255,0.25);
  color: white;
}

/* ===== Blog Index ===== */
.blog-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

@media (min-width: 768px) {
  .blog-container { padding: 4rem 2rem 5rem; }
}

/* Hero */
.blog-hero {
  margin-bottom: 3.5rem;
}

.blog-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #1a2b3c;
  margin: 0 0 0.75rem 0;
}

@media (min-width: 768px) {
  .blog-hero h1 { font-size: 3.2rem; }
}

.blog-hero p {
  font-size: 1.15rem;
  color: #5a6b7d;
  line-height: 1.6;
  margin: 0;
  max-width: 540px;
}

.blog-divider {
  width: 48px;
  height: 3px;
  background: #2c7a7b;
  border: none;
  border-radius: 2px;
  margin: 1.5rem 0 0 0;
}

/* ===== Article Cards ===== */
.article-card {
  background: white;
  border-radius: 12px;
  padding: 2rem 2.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e8ecf0;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.article-card:hover {
  border-color: #2c7a7b;
  box-shadow: 0 8px 30px rgba(44, 122, 123, 0.1);
  transform: translateY(-2px);
}

.article-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.article-card-category {
  display: inline-block;
  background: #e6fffa;
  color: #2c7a7b;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.article-card-time {
  font-size: 0.78rem;
  color: #94a3b8;
}

.article-card h2 {
  color: #1a2b3c;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-card-subtitle {
  color: #5a6b7d;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
  line-height: 1.55;
}

.article-card-excerpt {
  color: #6b7c8d;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0 0 1.25rem 0;
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.article-card-author {
  font-size: 0.82rem;
  color: #94a3b8;
}

.article-card-read {
  color: #2c7a7b;
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s;
}

.article-card:hover .article-card-read {
  gap: 0.5rem;
}

/* ===== Article Page ===== */
.article-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

@media (min-width: 768px) {
  .article-container { padding: 3rem 2rem 5rem; }
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #5a6b7d;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}

.article-back:hover {
  color: #2c7a7b;
}

/* Article Header */
.article-header {
  margin-bottom: 2.5rem;
}

.article-header-category {
  display: inline-block;
  background: #e6fffa;
  color: #2c7a7b;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #1a2b3c;
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

@media (min-width: 768px) {
  .article-header h1 { font-size: 2.8rem; }
}

.article-header-subtitle {
  font-size: 1.15rem;
  color: #5a6b7d;
  margin: 0 0 1.5rem 0;
  line-height: 1.55;
}

.article-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e8ecf0;
}

.article-header-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Article Body */
.article-body {
  background: white;
  border-radius: 12px;
  padding: 2.5rem 2.25rem;
  border: 1px solid #e8ecf0;
}

.article-body p {
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.85;
  margin: 0 0 1.5rem 0;
}

.article-body a {
  color: #2c7a7b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: #38a169;
}

.article-body ul {
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.85;
  padding-left: 1.5rem;
  margin: 0 0 1.5rem 0;
}

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

/* Q&A Section */
.qa-section {
  margin: 2rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.qa-section:hover {
  border-color: #cbd5e1;
}

.qa-section.highlight {
  border-color: #2c7a7b;
  box-shadow: 0 0 0 1px #2c7a7b;
}

.qa-question {
  background: #f8fafb;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.qa-section.highlight .qa-question {
  background: #fef8f7;
}

.qa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.qa-avatar.grammar {
  background: #fee2e2;
}

.qa-avatar.bazaar {
  background: #e6fffa;
}

.qa-question-text {
  flex: 1;
}

.qa-question-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #e05252;
  margin-bottom: 0.3rem;
}

.qa-question-text p {
  margin: 0;
  color: #1a2b3c;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
}

.qa-answer {
  background: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border-top: 1px solid #e8ecf0;
}

.qa-section.highlight .qa-answer {
  background: #f0fdf4;
}

.qa-answer-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #2c7a7b;
  margin-bottom: 0.3rem;
}

.qa-answer-text {
  flex: 1;
}

.qa-answer-text p {
  margin: 0;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.65;
}

.qa-section.highlight .qa-answer-text p {
  font-weight: 600;
  color: #1a5c3a;
}

/* Intro Section */
.article-intro {
  padding-top: 0;
  margin-bottom: 0.5rem;
}

/* Takeaway Section */
.article-takeaway {
  background: #f0fdf4;
  border-radius: 10px;
  padding: 2rem 2.25rem;
  margin: 2.5rem 0 1.5rem;
  border: 1px solid #c6f6d5;
}

.article-takeaway h2 {
  color: #1a2b3c;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
}

.article-takeaway p {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-takeaway ul {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.75;
}

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

.article-takeaway a {
  color: #2c7a7b;
  font-weight: 600;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e8ecf0;
}

.article-tag {
  background: #f1f5f9;
  color: #64748b;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.2s;
}

.article-tag:hover {
  background: #e6fffa;
  color: #2c7a7b;
}

/* ===== CTA Banner ===== */
.blog-cta {
  background: linear-gradient(135deg, #2c7a7b 0%, #2d5f5d 100%);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  margin-top: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.blog-cta h3 {
  color: white;
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
}

.blog-cta p {
  color: rgba(255,255,255,0.8);
  margin: 0 0 1.5rem 0;
  font-size: 1.05rem;
  position: relative;
}

.blog-cta-button {
  display: inline-block;
  background: white;
  color: #2c7a7b;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.blog-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ===== Footer ===== */
.page-footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  font-size: 0.82rem;
}

.page-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.page-footer a:hover {
  color: #2c7a7b;
}

.page-footer .footer-sep {
  color: #cbd5e1;
  margin: 0 0.5rem;
}

/* ===== Article Images & Figures ===== */
.article-figure {
  margin: 2rem -0.5rem;
  text-align: center;
}

.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

/* ===== Richtext Sections ===== */
.article-richtext {
  margin: 0;
}

.article-richtext h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2b3c;
  margin: 2.5rem 0 1rem 0;
  letter-spacing: -0.01em;
}

.article-richtext h2:first-child {
  margin-top: 0.5rem;
}

.article-richtext p {
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.85;
  margin: 0 0 1.5rem 0;
}

.article-richtext ul {
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.85;
  padding-left: 1.5rem;
  margin: 0 0 1.5rem 0;
}

.article-richtext li {
  margin-bottom: 0.6rem;
}

.article-richtext a {
  color: #2c7a7b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Blockquotes ===== */
.article-body blockquote,
.article-richtext blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid #2c7a7b;
  background: #f8fafb;
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #334155;
  font-style: italic;
}

.article-body blockquote strong,
.article-richtext blockquote strong {
  font-style: normal;
  color: #1a2b3c;
}
