/* ============================================================
   blog.css — صفحات المدونة والمقالات
   ============================================================ */

/* ===== BLOG LISTING ===== */
.blog-hero {
  position: relative;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  text-align: center;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 20% 80%, rgba(201,168,76,.12), transparent),
    radial-gradient(ellipse 40% 50% at 80% 20%, rgba(201,168,76,.08), transparent);
}
.blog-hero-content {
  position: relative; z-index: 2;
}
.blog-hero .kicker { background: rgba(201,168,76,.15); border-color: rgba(201,168,76,.3); color: var(--gold-light); }
.blog-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900; color: #fff;
  margin-bottom: 14px;
}
.blog-hero p {
  font-size: 16px; color: rgba(255,255,255,.7);
  max-width: 560px; margin: 0 auto; line-height: 1.8;
}

/* ===== BLOG CARDS GRID ===== */
.blog-section { padding: 80px 0; background: var(--cloud); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t);
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.blog-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(201,168,76,.15);
}
.blog-card-img {
  width: 100%; height: 220px;
  object-fit: cover;
  transition: transform .6s ease;
}
.blog-card:hover .blog-card-img { transform: scale(1.04); }
.blog-card-img-wrap { overflow: hidden; position: relative; }
.blog-card-cat {
  position: absolute; top: 14px; right: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 50px;
}
.blog-card-body {
  padding: 24px; display: flex;
  flex-direction: column; flex: 1; gap: 10px;
}
.blog-card-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--text-muted);
}
.blog-card-meta i { color: var(--gold); font-size: 11px; }
.blog-card-body h3 {
  font-size: 18px; font-weight: 800;
  color: var(--navy); line-height: 1.5;
  margin: 0;
}
.blog-card:hover .blog-card-body h3 { color: var(--gold-dark); }
.blog-card-body p {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.8; flex: 1; margin: 0;
}
.blog-card-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700;
  color: var(--gold-dark); margin-top: 6px;
  transition: gap .25s;
}
.blog-card-link:hover { gap: 12px; }

/* ===== ARTICLE PAGE ===== */
.article-hero {
  position: relative;
  height: 460px;
  display: flex; align-items: flex-end;
  overflow: hidden; margin-top: 80px;
}
.article-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.article-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,33,53,.96) 0%, rgba(10,20,32,.85) 50%, rgba(16,32,51,.9) 100%);
}
.article-hero-content {
  position: relative; z-index: 2;
  padding-bottom: 48px; color: #fff;
}
.article-hero-content h1 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 900; line-height: 1.4;
  margin-bottom: 16px; max-width: 700px;
}
.article-meta {
  display: flex; align-items: center; gap: 18px;
  font-size: 13px; color: rgba(255,255,255,.65);
  flex-wrap: wrap;
}
.article-meta i { color: var(--gold); font-size: 12px; }

/* ===== ARTICLE BODY ===== */
.article-content {
  padding: 70px 0;
  background: var(--white);
}
.article-wrapper {
  max-width: 780px;
  margin: 0 auto;
}
.article-wrapper h2 {
  font-size: 24px; font-weight: 800;
  color: var(--navy); margin: 44px 0 18px;
  padding-right: 16px;
  border-right: 4px solid var(--gold);
  line-height: 1.4;
}
.article-wrapper h3 {
  font-size: 19px; font-weight: 700;
  color: var(--navy-mid); margin: 30px 0 14px;
}
.article-wrapper p {
  font-size: 16px; color: var(--text);
  line-height: 2; margin-bottom: 18px;
}
.article-wrapper ul, .article-wrapper ol {
  padding-right: 24px; margin-bottom: 20px;
}
.article-wrapper li {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.9; margin-bottom: 8px;
}
.article-wrapper li::marker { color: var(--gold); }

/* Article tip box */
.article-tip {
  background: var(--gold-tint);
  border: 1.5px solid rgba(201,168,76,.3);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin: 32px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.article-tip-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--navy);
}
.article-tip p { margin: 0; font-size: 14.5px; color: var(--gold-dark); font-weight: 500; line-height: 1.8; }

/* Article CTA */
.article-cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: var(--r-lg);
  padding: 40px; text-align: center;
  margin-top: 48px;
}
.article-cta h3 {
  color: #fff !important; font-size: 22px; font-weight: 800;
  margin: 0 0 10px !important;
}
.article-cta p {
  color: rgba(255,255,255,.7) !important;
  font-size: 15px; margin-bottom: 22px !important;
}

/* Related articles */
.related-section {
  padding: 70px 0;
  background: var(--cloud);
}

/* ===== PORTFOLIO PAGE ===== */
.portfolio-hero {
  position: relative;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  text-align: center; overflow: hidden;
}
.portfolio-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 20% 80%, rgba(201,168,76,.12), transparent),
    radial-gradient(ellipse 40% 50% at 80% 20%, rgba(201,168,76,.08), transparent);
}
.portfolio-hero-content { position: relative; z-index: 2; }
.portfolio-hero .kicker { background: rgba(201,168,76,.15); border-color: rgba(201,168,76,.3); color: var(--gold-light); }
.portfolio-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900; color: #fff; margin-bottom: 14px;
}
.portfolio-hero p {
  font-size: 16px; color: rgba(255,255,255,.7);
  max-width: 560px; margin: 0 auto; line-height: 1.8;
}

/* Portfolio stats */
.portfolio-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 40px; flex-wrap: wrap;
}
.portfolio-stat {
  text-align: center;
}
.portfolio-stat b {
  display: block; font-size: 36px;
  font-weight: 900; color: var(--gold);
}
.portfolio-stat span {
  font-size: 13px; color: rgba(255,255,255,.6);
}

/* Portfolio grid */
.portfolio-section { padding: 80px 0; background: var(--white); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.project-card {
  background: var(--cloud);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t);
}
.project-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(201,168,76,.14);
}
.project-card-img {
  width: 100%; height: 260px;
  object-fit: cover;
  transition: transform .6s ease;
}
.project-card-img-wrap { overflow: hidden; position: relative; }
.project-card:hover .project-card-img { transform: scale(1.04); }
.project-card-badge {
  position: absolute; top: 14px; right: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 50px;
}
.project-card-status {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 14px; border-radius: 50px;
  font-size: 11px; font-weight: 700;
}
.status-done { background: #2a9d5c; color: #fff; }
.status-progress { background: #3b82f6; color: #fff; }
.project-card-body { padding: 28px; }
.project-card-body h3 {
  font-size: 20px; font-weight: 800;
  color: var(--navy); margin-bottom: 10px;
}
.project-card:hover .project-card-body h3 { color: var(--gold-dark); }
.project-card-body > p {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.8; margin-bottom: 18px;
}
.project-details {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 18px;
}
.project-detail {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
}
.project-detail i { color: var(--gold); font-size: 12px; width: 16px; text-align: center; }
.project-detail b { color: var(--navy); font-weight: 600; }
.project-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project-tag {
  background: var(--gold-tint);
  border: 1px solid rgba(201,168,76,.25);
  padding: 4px 12px; border-radius: 50px;
  font-size: 11.5px; font-weight: 600;
  color: var(--gold-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .blog-hero, .portfolio-hero { padding: 130px 0 60px; }
  .blog-section, .portfolio-section, .article-content, .related-section { padding: 56px 0; }
  .blog-grid { grid-template-columns: 1fr; }
  .article-hero { height: 360px; }
  .article-wrapper { padding: 0 4px; }
  .article-cta { padding: 28px 20px; }
  .project-details { grid-template-columns: 1fr; }
  .portfolio-stats { gap: 28px; }
  .portfolio-stat b { font-size: 28px; }
}
