/* ================================================================
   ECEJI — Electrical & Computer Engineering Jobs Israel
   Main Stylesheet
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset & Variables ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark-blue:   #1b3a6b;
  --mid-blue:    #2563eb;
  --sky-blue:    #3b9eff;
  --light-blue:  #e8f1ff;
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --text-primary:   #1b3a6b;
  --text-secondary: #4a5e7a;
  --text-muted:     #7a90a8;
  --border:      #dde8f5;
  --shadow:      0 4px 20px rgba(27,58,107,0.10);
  --shadow-hover:0 10px 36px rgba(27,58,107,0.18);
  --radius:      14px;
  --radius-sm:   8px;
  --navbar-h:    68px;
}

/* ── Base ──────────────────────────────────────────────────────── */
html {
  direction: rtl;
  font-family: 'Heebo', sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Navbar ────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(27,58,107,0.07);
  height: var(--navbar-h);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo (DOM-first → appears on RIGHT in RTL) */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.logo-badge {
  background: linear-gradient(135deg, var(--dark-blue), var(--sky-blue));
  color: white;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.3;
  max-width: 120px;
}

/* Nav links (DOM-second → appears on LEFT in RTL) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-links a:hover { background: var(--light-blue); color: var(--dark-blue); }
.nav-links a.active {
  background: var(--light-blue);
  color: var(--dark-blue);
  font-weight: 700;
}
.nav-links .nav-cta {
  background: var(--dark-blue);
  color: var(--white) !important;
  padding: 8px 22px;
  border-radius: 20px;
  margin-right: 6px;
}
.nav-links .nav-cta:hover { background: var(--sky-blue); transform: translateY(-1px); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Heebo', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}
.btn-primary { background: var(--white); color: var(--dark-blue); }
.btn-primary:hover {
  background: var(--light-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: white;
  transform: translateY(-2px);
}
.btn-blue {
  background: var(--dark-blue);
  color: var(--white);
}
.btn-blue:hover { background: var(--mid-blue); transform: translateY(-2px); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--dark-blue) 0%, #1d4ed8 58%, var(--sky-blue) 100%);
  color: white;
  padding: 92px 28px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 820px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  opacity: 0.88;
  max-width: 620px;
  margin: 0 auto 36px;
  font-weight: 300;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Stats Bar ─────────────────────────────────────────────────── */
.stats-bar {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 26px 28px;
}
.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.stat-number { font-size: 1.9rem; font-weight: 900; color: var(--dark-blue); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Layout Helpers ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; }
.section { padding: 72px 28px; }
.section-alt { background: var(--off-white); }
.section-header { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block;
  background: var(--light-blue);
  color: var(--mid-blue);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--dark-blue);
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Feature Cards (home) ──────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: var(--sky-blue); }
.card-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: var(--light-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.65; flex: 1; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; color: var(--sky-blue); font-weight: 600;
  font-size: 0.9rem; transition: gap 0.2s;
}
.card-link:hover { gap: 10px; }

/* ── CTA Banner ────────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--dark-blue), #1d4ed8);
  color: white;
  padding: 64px 28px;
  text-align: center;
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.cta-banner p { opacity: 0.85; margin-bottom: 28px; font-size: 1.05rem; max-width: 500px; margin-inline: auto; margin-bottom: 28px; }

/* ── Page Header (inner pages) ─────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--dark-blue) 0%, #1d4ed8 100%);
  color: white;
  padding: 56px 28px;
  text-align: center;
}
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 900; margin-bottom: 10px; }
.page-header p { font-size: 1.05rem; opacity: 0.85; max-width: 500px; margin: 0 auto; }

/* ── Survey Cards (surveys page) ───────────────────────────────── */
.surveys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.survey-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.survey-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); }

.survey-card-head {
  padding: 28px 28px 20px;
  color: white;
  position: relative;
  overflow: hidden;
}
.survey-card-head.y2026 { background: linear-gradient(135deg, #1b3a6b, #2563eb); }
.survey-card-head.y2022 { background: linear-gradient(135deg, #1e4d7b, #1a8ad4); }
.survey-card-head.y2021 { background: linear-gradient(135deg, #2d3748, #4a6fa5); }

.survey-bg-year {
  position: absolute; left: 16px; bottom: -10px;
  font-size: 5.5rem; font-weight: 900; opacity: 0.12; line-height: 1;
  pointer-events: none;
}
.survey-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 3px 10px; border-radius: 12px;
  font-size: 0.74rem; font-weight: 600;
  margin-bottom: 10px;
}
.survey-badge.new { background: #fbbf24; border-color: #f59e0b; color: #1a1a1a; }
.survey-card-head h3 { font-size: 1.25rem; font-weight: 800; position: relative; }

.survey-card-body {
  padding: 24px 28px 28px;
  flex: 1; display: flex; flex-direction: column;
}
.survey-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.survey-meta span { font-size: 0.8rem; color: var(--text-muted); }
.survey-description { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.65; flex: 1; margin-bottom: 18px; }
.survey-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag {
  background: var(--light-blue); color: var(--mid-blue);
  padding: 3px 10px; border-radius: 12px;
  font-size: 0.76rem; font-weight: 500;
}

/* ── Article Page ──────────────────────────────────────────────── */
.article-header {
  background: linear-gradient(135deg, var(--dark-blue) 0%, #1d4ed8 100%);
  color: white; padding: 56px 28px;
}
.breadcrumb { font-size: 0.82rem; opacity: 0.7; margin-bottom: 14px; }
.breadcrumb a { color: white; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; line-height: 1.28; margin-bottom: 14px;
}
.article-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.83rem; opacity: 0.82; }

.article-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 52px 28px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  align-items: start;
}
.article-body h2 {
  font-size: 1.4rem; font-weight: 700; color: var(--dark-blue);
  margin: 36px 0 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--light-blue);
}
.article-body h3 { font-size: 1.15rem; font-weight: 700; color: var(--dark-blue); margin: 28px 0 12px; }
.article-body p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.article-body ul { list-style: disc; padding-right: 24px; margin-bottom: 16px; }
.article-body ul li { color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.article-body a { color: var(--mid-blue); text-decoration: underline; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.article-body img { margin: 20px 0; border-radius: var(--radius-sm); height: auto; }
.article-body blockquote {
  border-right: 4px solid var(--sky-blue); padding: 12px 20px;
  margin: 20px 0; background: var(--light-blue); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary); font-style: italic;
}
.article-body sup a { color: var(--mid-blue); font-size: 0.75em; text-decoration: none; }
.article-toc {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 32px;
}
.article-toc h4 { font-size: 1rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 14px; }
.article-toc ol { list-style: decimal; padding-right: 20px; }
.article-toc ol li { margin-bottom: 6px; }
.article-toc ol li a { color: var(--mid-blue); text-decoration: none; font-size: 0.9rem; }
.article-toc ol li a:hover { text-decoration: underline; }
.article-closing { font-size: 1.1rem; font-weight: 600; color: var(--dark-blue); text-align: center; padding: 20px 0; }
.footnotes { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.footnotes h4 { font-size: 0.95rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 12px; }
.footnotes ol { list-style: decimal; padding-right: 20px; }
.footnotes ol li { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 6px; }


.article-placeholder {
  background: var(--off-white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 40px; text-align: center;
}
.article-placeholder .ph-icon { font-size: 3rem; margin-bottom: 16px; }
.article-placeholder p { color: var(--text-muted); font-size: 1.05rem; }

.article-sidebar { position: sticky; top: calc(var(--navbar-h) + 24px); }
.sidebar-card {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.sidebar-card h4 {
  font-size: 0.8rem; font-weight: 700; color: var(--dark-blue);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 14px;
}
.sidebar-card ul { display: flex; flex-direction: column; gap: 4px; }
.sidebar-card ul li a {
  display: block; padding: 8px 0;
  color: var(--text-secondary); font-size: 0.88rem;
  border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.sidebar-card ul li:last-child a { border-bottom: none; }
.sidebar-card ul li a:hover { color: var(--sky-blue); }
.sidebar-highlight {
  background: var(--light-blue); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center; margin-bottom: 20px;
}
.sidebar-highlight .sh-number { font-size: 2rem; font-weight: 900; color: var(--dark-blue); }
.sidebar-highlight .sh-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ── Calculator Page ───────────────────────────────────────────── */
.calculator-wrap {
  max-width: 860px; margin: 0 auto; padding: 64px 28px;
}
.calculator-intro {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; margin-bottom: 28px;
}
.calculator-intro h2 { font-size: 1.4rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 10px; }
.calculator-intro p { color: var(--text-secondary); line-height: 1.75; }

.calculator-box {
  background: var(--white); border: 1px solid var(--border);
  border-top: 4px solid var(--sky-blue);
  border-radius: var(--radius); padding: 56px 40px;
  text-align: center; min-height: 320px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.calculator-box .calc-icon { font-size: 3.5rem; margin-bottom: 18px; }
.calculator-box h3 { font-size: 1.4rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 10px; }
.calculator-box p { color: var(--text-muted); max-width: 380px; line-height: 1.65; }

.how-it-works {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px;
}
.step-card {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 24px; text-align: center;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--dark-blue); color: white;
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.step-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 6px; }
.step-card p { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Footer ────────────────────────────────────────────────────── */
.footer { background: var(--dark-blue); color: rgba(255,255,255,0.65); padding: 52px 28px 28px; margin-top: auto; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.footer-brand .logo { color: white; margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.65; max-width: 280px; }
.footer-col h4 { color: white; font-size: 0.85rem; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--sky-blue); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: var(--sky-blue); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-layout { grid-template-columns: 1fr; padding: 36px 20px; }
  .article-sidebar { position: static; }
  .how-it-works { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links .logo-sub { display: none; }
  .nav-links .nav-cta { display: none; }
  .nav-links a { padding: 6px 10px; font-size: 0.85rem; }
  .hero { padding: 60px 16px 50px; }
  .section { padding: 48px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .calculator-box { padding: 36px 20px; }
  .calculator-intro { padding: 24px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
