/* =============================================
   Egytel — Blog (index, cards, article)
   Builds on pages.css (.card-grid / .content-card) and the
   page tokens in style.css. Only blog-scoped rules live here.
   ============================================= */

/* ── Cards ─────────────────────────────────── */
.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.post-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card .card-thumb {
  height: 190px;
  overflow: hidden;
}

.post-card .card-thumb.has-cover {
  background: var(--bg-alt);
}

.post-card .card-thumb.has-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

.post-card:hover .card-thumb.has-cover img {
  transform: scale(1.04);
}

.post-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.post-card .card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-card .card-date-sep {
  opacity: .5;
}

.post-card h3 {
  line-height: 1.4;
}

.post-card h3 a {
  color: inherit;
}

.post-card p {
  flex: 1 1 auto;
}

.post-card .read-more {
  margin-top: auto;
}

/* ── Index ─────────────────────────────────── */
.blog-empty {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 0 20px;
}

.blog-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 50%;
  color: var(--primary);
}

.blog-empty-icon svg {
  width: 32px;
  height: 32px;
}

.blog-empty h2 {
  margin-bottom: 12px;
}

.blog-empty p {
  color: var(--text-light);
  margin-bottom: 28px;
}

.blog-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.blog-pagination .pagination {
  margin: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-pagination .page-link {
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .5rem .9rem;
  font-weight: 600;
  font-size: .9rem;
}

.blog-pagination .page-link:hover {
  background: var(--bg-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.blog-pagination .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.blog-pagination .page-item.disabled .page-link {
  color: var(--text-lighter);
}

/* ── Article ───────────────────────────────── */
.article-hero h1 {
  max-width: 900px;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.3;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .9rem;
  color: rgba(255, 255, 255, .75);
}

.article-meta-sep {
  opacity: .5;
}

.article-section {
  background: #fff;
}

.article-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.article-cover {
  margin: 0 0 40px;
}

.article-cover img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--dark);
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: .6em;
}

.article-body h2 { font-size: 1.55rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body h4 { font-size: 1.1rem; }

.article-body p {
  margin-bottom: 1.4em;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.4em;
  padding-inline-start: 1.4em;
}

.article-body li {
  margin-bottom: .5em;
}

/* pages.css draws its own dot before every .page-section li; inside an article
   the native disc/number is the correct marker, so the decoration is dropped. */
.article-body li::before {
  content: none;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--accent-dark);
}

.article-body img {
  max-width: 100%;
  height: auto;
  margin: 1.6em 0;
}

.article-body blockquote {
  margin: 1.8em 0;
  padding: 20px 24px;
  border-inline-start: 4px solid var(--primary);
  background: var(--bg-light);
  font-size: 1.05rem;
  color: var(--dark-secondary);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
}

.article-body table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: .95rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: start;
}

.article-body th {
  background: var(--bg-light);
  font-weight: 700;
  color: var(--dark);
}

.article-body code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}

.article-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--primary-dark);
}

.article-back svg {
  width: 16px;
  height: 16px;
}

.article-back:hover {
  color: var(--accent);
}

[dir="rtl"] .article-back svg {
  transform: scaleX(-1);
}

.article-related {
  background: var(--bg-light);
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 991px) {
  .post-card .card-thumb {
    height: 210px;
  }
}

@media (max-width: 575px) {
  .article-body {
    font-size: 1rem;
    line-height: 1.75;
  }

  .article-cover {
    margin-bottom: 28px;
  }
}
