/* ============================================
   ILTechJobs Blog — Modern RTL Design
   ============================================ */

:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-deep:   #1e40af;
  --blue-light:  #eff6ff;
  --amber:       #f59e0b;
  --green:       #10b981;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --bg:          #f1f5f9;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
  --shadow:      0 2px 16px rgba(30, 41, 59, 0.08);
  --shadow-lg:   0 8px 40px rgba(30, 41, 59, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Arial', Tahoma, Geneva, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---- SITE HEADER ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.site-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.site-logo span { color: var(--amber); }

.header-back-btn {
  background: var(--blue-light);
  color: var(--blue);
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  font-family: inherit;
  cursor: pointer;
}
.header-back-btn:hover { background: #dbeafe; }

/* ---- INDEX HERO ---- */
.blog-hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: white;
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.blog-hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.blog-hero p {
  font-size: 1.15rem;
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- POST CARDS GRID ---- */
.posts-grid {
  max-width: 1100px;
  margin: 3.5rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-card-img {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
}

.post-card-body {
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  width: fit-content;
}

.post-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.post-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.1rem;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

.read-more {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s;
}
.read-more::before { content: '←'; }
.read-more:hover { gap: 0.55rem; }

.read-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- ARTICLE HEADER ---- */
.article-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: white;
  padding: 4rem 2rem 3.5rem;
  text-align: center;
}

.breadcrumb {
  font-size: 0.82rem;
  opacity: 0.78;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: 0.5; }

.article-header h1 {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.3;
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.article-meta {
  font-size: 0.85rem;
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- ARTICLE BODY ---- */
.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.article-content {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  line-height: 1.95;
  font-size: 1.05rem;
  border: 1px solid var(--border);
}

.article-content h2 {
  font-size: 1.45rem;
  color: var(--blue);
  font-weight: 800;
  margin: 2.5rem 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--blue-light);
  line-height: 1.3;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 700;
  margin: 1.8rem 0 0.55rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: #334155;
}

.article-content ul,
.article-content ol {
  padding-right: 1.6rem;
  margin: 0.75rem 0 1.5rem;
}

.article-content li {
  margin-bottom: 0.55rem;
  color: #334155;
}

.article-content strong { color: var(--text); font-weight: 700; }

.article-content a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- CALLOUT / TIP / STATS ---- */
.callout {
  background: var(--blue-light);
  border-right: 4px solid var(--blue);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
  color: #1e3a8a;
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
}

.tip-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0;
}
.tip-label {
  font-weight: 800;
  color: #b45309;
  font-size: 0.83rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.stat-item {
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--blue);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ---- CTA SECTION ---- */
.cta-section {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: white;
  text-align: center;
  padding: 2.75rem 2rem;
  border-radius: var(--radius);
  margin: 2.5rem 0 0;
}
.cta-section h2 {
  font-size: 1.55rem !important;
  font-weight: 800 !important;
  color: white !important;
  border: none !important;
  margin: 0 0 0.8rem !important;
  padding: 0 !important;
}
.cta-section p {
  color: rgba(255,255,255,0.9) !important;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.cta-btn {
  display: inline-block;
  background: white;
  color: var(--blue);
  padding: 0.75rem 2.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(0,0,0,0.22);
}

/* ---- POST NAVIGATION ---- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.post-nav a {
  flex: 1;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
  transition: background 0.2s;
}
.post-nav a:hover { background: var(--blue-light); }

/* ---- SITE FOOTER ---- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 2.5rem 2rem;
  margin-top: 0;
}
.site-footer a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer p {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .blog-hero h1       { font-size: 1.9rem; }
  .article-header h1  { font-size: 1.5rem; }
  .article-content    { padding: 1.5rem 1.2rem; }
  .posts-grid         { grid-template-columns: 1fr; }
  .stat-num           { font-size: 1.4rem; }
  .site-header        { padding: 0.75rem 1rem; }
  .article-body       { padding: 1.5rem 1rem 3rem; }
}
