/* ==========================================================================
   IranWindscribe — Blog & Article System Styles
   Theme tokens: derived from windscribe.css
   ========================================================================== */

/* Blog Index Grid & Cards */
.blog-hero {
  text-align: center;
  padding: 3.5rem 1rem 2rem;
}
.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0.5rem 0 1rem;
}
.blog-hero .hero-lead {
  max-width: 680px;
  margin: 0 auto 1.5rem;
  color: var(--text-2);
  font-size: 1.05rem;
}

.blog-cat-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.blog-cat-pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s ease;
}
.blog-cat-pill:hover,
.blog-cat-pill.is-active {
  background: rgba(85, 255, 138, 0.12);
  border-color: var(--green);
  color: var(--green);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(85, 255, 138, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.blog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.blog-card-badge {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  background: rgba(148, 0, 255, 0.16);
  border: 1px solid rgba(148, 0, 255, 0.35);
  color: #c780ff;
  font-weight: 600;
}
.blog-card-time {
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.blog-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.blog-card h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin: 0 0 0.75rem;
}
.blog-card p {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border-soft);
  font-size: 0.84rem;
  color: var(--green);
  font-weight: 600;
}
.blog-card-footer .arrow {
  transition: transform 0.2s ease;
  display: inline-block;
}
.blog-card:hover .blog-card-footer .arrow {
  transform: translateX(-4px);
}

/* Article View Page */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumbs a:hover {
  color: var(--green);
}
.breadcrumbs span.sep {
  opacity: 0.4;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
}
.article-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin: 0.75rem 0 1rem;
}
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.article-meta-row .pill {
  background: rgba(85, 255, 138, 0.12);
  color: var(--green);
  border: 1px solid rgba(85, 255, 138, 0.3);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Article Body Typography */
.article-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-2);
}
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--card-border-soft);
  position: relative;
}
.article-body h2::before {
  content: "";
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--green);
}
.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 1.75rem 0 0.75rem;
}
.article-body p {
  margin: 0 0 1.25rem;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1.5rem;
  padding-right: 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body strong {
  color: #fff;
}
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: rgba(20, 26, 38, 0.7);
  border-right: 4px solid var(--green);
  border-radius: 6px;
  color: var(--text);
  font-style: italic;
  font-size: 0.95rem;
}
.article-body code {
  background: var(--surface-3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: var(--teal);
  font-family: monospace;
  font-size: 0.9em;
}

/* Responsive Table */
.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--surface);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}
.article-table th {
  background: var(--surface-2);
  color: var(--green);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--card-border);
  font-weight: 700;
}
.article-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border-soft);
  color: var(--text-2);
}
.article-table tr:last-child td {
  border-bottom: none;
}
.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Info Callout Box */
.callout-box {
  background: rgba(20, 26, 38, 0.9);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.callout-box--highlight {
  border-color: rgba(85, 255, 138, 0.35);
  background: rgba(85, 255, 138, 0.04);
}
.callout-box h3, .callout-box h4 {
  margin-top: 0;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* FAQ Section in Article */
.article-faq {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
}
.article-faq-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.article-faq-q {
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  padding: 1rem 1.25rem;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.article-faq-q:hover {
  background: rgba(255, 255, 255, 0.02);
}
.article-faq-a {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-2);
  line-height: 1.75;
  font-size: 0.95rem;
  display: none;
}
.article-faq-item.is-open .article-faq-a {
  display: block;
}
.article-faq-item.is-open .article-faq-q {
  color: var(--green);
}
.article-faq-icon {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}
.article-faq-item.is-open .article-faq-icon {
  transform: rotate(45deg);
}

/* Purchase CTA Box inside Article */
.article-cta {
  background: linear-gradient(135deg, rgba(148, 0, 255, 0.18) 0%, rgba(85, 255, 138, 0.12) 100%);
  border: 1px solid rgba(148, 0, 255, 0.4);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  margin: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.6rem;
}
.article-cta p {
  color: var(--text-2);
  font-size: 0.96rem;
  margin: 0 auto 1.5rem;
  max-width: 580px;
}
.article-cta-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Related Articles */
.related-posts {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
}
.related-posts h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.related-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}
.related-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}
.related-card span {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .article-cta-btns {
    flex-direction: column;
  }
  .article-cta-btns .btn {
    width: 100%;
  }
}
