/*
 * Movasseghi — Blog & News content pages
 * Mobile-first, premium UX, SEO-friendly structure
 */

.ct-page {
  padding: 0.35rem 0 calc(var(--tabbar) + 1.5rem);
}

/* Hero — light editorial, aligned with site sage palette */
.ct-hero {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.25rem 1.1rem 1.15rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  color: var(--c-primary-dark);
  background:
    linear-gradient(145deg, #fff 0%, var(--c-primary-light) 42%, #f3f4f6 100%);
  border: 1px solid rgba(61, 90, 76, 0.12);
  box-shadow:
    0 12px 40px rgba(61, 90, 76, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.ct-hero--news .ct-hero-kicker--pulse::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e05252;
  box-shadow: 0 0 0 0 rgba(224, 82, 82, 0.5);
  animation: ctPulse 2s ease infinite;
}

@keyframes ctPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 82, 82, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(224, 82, 82, 0); }
}

.ct-hero-glow {
  position: absolute;
  inset: -20% auto auto -15%;
  width: 55%;
  height: 120%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.18) 0%, transparent 68%);
  pointer-events: none;
}

.ct-hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(61, 90, 76, 0.12);
  pointer-events: none;
}

.ct-hero-ring--1 {
  width: 140px;
  height: 140px;
  top: -30px;
  left: -40px;
  opacity: 0.55;
}

.ct-hero-ring--2 {
  width: 90px;
  height: 90px;
  bottom: -20px;
  right: 18%;
  opacity: 0.35;
}

.ct-hero-mark {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  width: 88px;
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  filter: grayscale(1);
}

.ct-hero-inner {
  position: relative;
  z-index: 1;
}

.ct-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.ct-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(61, 90, 76, 0.14);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--c-primary-dark);
  box-shadow: 0 2px 10px rgba(61, 90, 76, 0.06);
}

.ct-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ct-hero-stat {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(61, 90, 76, 0.07);
  color: var(--c-primary);
  border: 1px solid rgba(61, 90, 76, 0.08);
}

.ct-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.15rem, 4.2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--c-primary-dark);
}

.ct-hero p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--c-text-2);
  max-width: 36em;
}

.ct-hero-tabs {
  display: inline-flex;
  gap: 0.35rem;
  margin-top: 0.95rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(61, 90, 76, 0.12);
  box-shadow: inset 0 1px 3px rgba(61, 90, 76, 0.06);
}

.ct-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--c-text-2);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.ct-tab-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.ct-tab.is-active {
  background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(36, 56, 48, 0.22);
}

.ct-tab:not(.is-active):hover {
  background: rgba(61, 90, 76, 0.06);
  color: var(--c-primary-dark);
  transform: translateY(-1px);
}

/* Breadcrumb */
.ct-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  color: var(--c-text-2);
}

.ct-breadcrumb a {
  color: var(--c-primary);
  font-weight: 700;
}

/* Featured */
.ct-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 1rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-white);
  border: 1px solid rgba(61, 90, 76, 0.1);
  box-shadow: 0 10px 36px rgba(26, 31, 38, 0.08);
  color: inherit;
  transition: transform 0.35s, box-shadow 0.35s;
}

.ct-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(61, 90, 76, 0.12);
}

.ct-featured-visual {
  aspect-ratio: 16 / 9;
  padding: 1rem;
}

.ct-featured-visual.ct-card-visual--photo {
  padding: 0;
}

.ct-featured-visual img {
  width: auto !important;
  height: auto !important;
  max-width: 70% !important;
  max-height: 70% !important;
}

.ct-featured-body {
  padding: 1rem 1.1rem 1.15rem;
}

.ct-featured-body h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.5;
}

.ct-featured-body p {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: var(--c-text-2);
  line-height: 1.65;
}

.ct-featured-body time {
  display: block;
  font-size: 0.72rem;
  color: var(--c-muted);
  margin-bottom: 0.35rem;
}

/* Breaking news strip */
.ct-breaking {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, rgba(180, 40, 40, 0.08), rgba(201, 168, 76, 0.06));
  border: 1px solid rgba(180, 40, 40, 0.15);
}

.ct-breaking-label {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 900;
  color: #b42828;
}

.ct-breaking-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ct-breaking-item {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
}

.ct-breaking-item:hover {
  color: var(--c-primary);
}

/* Grid */
.ct-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.ct-card {
  border-radius: var(--r-xl);
  background: var(--c-white);
  border: 1px solid rgba(61, 90, 76, 0.1);
  box-shadow: 0 4px 18px rgba(26, 31, 38, 0.06);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
}

.ct-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(61, 90, 76, 0.12);
}

.ct-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.ct-card-visual {
  aspect-ratio: 16 / 10;
  padding: 0.75rem;
}

.ct-card-visual--photo {
  padding: 0;
  background: linear-gradient(145deg, #eef4f0, #f8faf9);
  overflow: hidden;
}

.ct-card-visual img {
  width: auto !important;
  height: auto !important;
  max-width: 72% !important;
  max-height: 72% !important;
}

.ct-card-visual--photo img,
.ct-featured-visual.ct-card-visual--photo img,
.ct-article-cover.ct-card-visual--photo img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
}

.ct-card-body {
  padding: 0.85rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ct-date {
  font-size: 0.68rem;
  color: var(--c-muted);
  margin-bottom: 0.35rem;
}

.ct-card-title {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.55;
}

.ct-card-excerpt {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--c-text-2);
  line-height: 1.65;
  flex: 1;
}

.ct-read-more {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--c-primary);
}

.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.ct-badge--urgent {
  background: rgba(180, 40, 40, 0.1);
  color: #b42828;
}

/* Pagination */
.ct-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.ct-page-num,
.ct-page-btn {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--c-white);
  border: 1px solid rgba(61, 90, 76, 0.12);
  color: var(--c-text);
}

.ct-page-num.is-active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* CTA */
/* Closing CTA — premium panel */
.ct-closing {
  position: relative;
  margin-top: 0.5rem;
  padding: 1.35rem 1.1rem 1.25rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(155deg, var(--c-primary-dark) 0%, var(--c-primary) 52%, #2a4238 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(36, 56, 48, 0.22);
  color: #fff;
  text-align: center;
}

.ct-closing-glow {
  position: absolute;
  inset: -30% -10% auto auto;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.28) 0%, transparent 65%);
  pointer-events: none;
}

.ct-closing-spark {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  font-size: 1.1rem;
  color: var(--c-gold);
  opacity: 0.65;
  animation: ctSparkFloat 4s ease-in-out infinite;
}

@keyframes ctSparkFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50% { transform: translateY(-4px) rotate(12deg); opacity: 0.9; }
}

.ct-closing-inner {
  position: relative;
  z-index: 1;
}

.ct-closing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.ct-closing h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1rem, 3.8vw, 1.25rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.ct-closing p {
  margin: 0 auto 0.85rem;
  max-width: 28em;
  font-size: 0.78rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.ct-closing p strong {
  color: var(--c-gold);
  font-weight: 900;
}

.ct-closing-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.ct-closing-trust span {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.ct-closing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.ct-closing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.55rem 1rem;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.22s, box-shadow 0.22s, background 0.22s;
}

.ct-closing-btn--primary {
  background: linear-gradient(135deg, #fff 0%, #f0f5f2 100%);
  color: var(--c-primary-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ct-closing-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.ct-closing-btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.72rem;
}

.ct-closing-btn--phone {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.ct-closing-btn--phone:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.ct-closing-btn--ghost {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.88);
  min-height: 40px;
  font-size: 0.76rem;
}

.ct-closing-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Legacy alias */
.ct-cta { display: none; }

.ct-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--c-muted);
  font-size: 0.88rem;
}

/* Article detail */
.ct-page--article {
  padding-bottom: calc(var(--tabbar) + 2rem);
}

.ct-article-head {
  margin-bottom: 1rem;
}

.ct-article-title {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.5;
}

.ct-article-lead {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--c-text-2);
  line-height: 1.7;
}

.ct-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.72rem;
  color: var(--c-muted);
  font-weight: 700;
}

.ct-article-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 1rem;
}

.ct-article-cover.ct-card-visual--photo {
  padding: 0;
}

.ct-article-cover img {
  width: auto !important;
  height: auto !important;
  max-width: 65% !important;
  max-height: 65% !important;
}

.ct-prose .ct-inline-figure {
  margin: 0 0 1rem;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(61, 90, 76, 0.1);
}

.ct-prose .ct-inline-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ظرف مقاله — تایپوگرافی داخلی‌اش (سرتیتر، لینک، جدول، لیست) در prose.css است */
.ct-prose {
  background: var(--c-white);
  border: 1px solid rgba(61, 90, 76, 0.1);
  border-radius: var(--r-xl);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
}

/* FAQ */
.ct-faq {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--r-xl);
  background: var(--c-white);
  border: 1px solid rgba(61, 90, 76, 0.1);
}

.ct-faq h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 900;
}

.ct-faq-item {
  border-bottom: 1px solid rgba(61, 90, 76, 0.08);
}

.ct-faq-item:last-child {
  border-bottom: none;
}

.ct-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
  color: var(--c-text);
  cursor: pointer;
}

.ct-faq-q::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--c-primary);
  transition: transform 0.25s;
}

.ct-faq-item.is-open .ct-faq-q::after {
  transform: rotate(45deg);
}

.ct-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.ct-faq-item.is-open .ct-faq-a {
  max-height: 200px;
}

.ct-faq-a p {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--c-text-2);
}

/* Related */
.ct-related {
  margin-bottom: 1rem;
}

.ct-related h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 900;
}

.ct-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.ct-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--r-lg);
  background: var(--c-white);
  border: 1px solid rgba(61, 90, 76, 0.1);
  color: inherit;
  transition: border-color 0.25s, transform 0.25s;
}

.ct-related-card:hover {
  border-color: rgba(61, 90, 76, 0.22);
  transform: translateX(-2px);
}

.ct-related-card strong {
  font-size: 0.82rem;
  line-height: 1.5;
}

.ct-related-card time {
  font-size: 0.68rem;
  color: var(--c-muted);
}

.ct-article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
}

/* Desktop */
@media (min-width: 768px) {
  .ct-hero {
    padding: 1.55rem 1.45rem 1.35rem;
  }

  .ct-hero-mark {
    width: 120px;
    top: 1rem;
    left: 1.2rem;
  }

  .ct-closing-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .ct-closing-btn--primary {
    flex: 0 1 auto;
    min-width: 200px;
  }

  .ct-closing-btn--phone {
    flex: 0 1 auto;
  }

  .ct-closing-btn--ghost {
    flex: 0 1 100%;
    max-width: 220px;
    margin-inline: auto;
  }

  .ct-hero h1 {
    font-size: 1.75rem;
  }

  .ct-featured {
    grid-template-columns: 1.1fr 1fr;
  }

  .ct-featured-visual {
    aspect-ratio: auto;
    min-height: 220px;
  }

  .ct-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .ct-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ct-article-title {
    font-size: 1.65rem;
  }

  .ct-prose {
    padding: 1.35rem 1.5rem;
    font-size: 0.92rem;
  }
}

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

  .ct-related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
