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

:root {
  --blue: #133e6f;
  --orange: #f18e20;
  --white: #ffffff;
  --light: #f5f7fa;
  --gray: #6b7280;
  --border: #e5e7eb;
}

body {
  font-family: 'IBM Plex Sans Arabic', 'Readex Pro', sans-serif;
  direction: rtl;
  background: var(--white);
  color: var(--blue);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--white);
  border-bottom: 3px solid var(--orange);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(19,62,111,.08);
}

.header-logo {
  height: 60px;
  object-fit: contain;
}

.header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 16px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  transition: all .2s;
}

.back-btn:hover {
  background: var(--blue);
  color: var(--white);
}

/* ── Hero (index) ── */
.hero {
  position: relative;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(19,62,111,.55), transparent);
}

/* ── Nav buttons (index) ── */
.nav-section {
  padding: 48px 24px 64px;
  text-align: center;
  background: var(--white);
}

.nav-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 36px;
  position: relative;
  display: inline-block;
}

.nav-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin: 10px auto 0;
}

.nav-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 40px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 200px;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(19,62,111,.06);
}

.nav-btn:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 28px rgba(241,142,32,.18);
  transform: translateY(-4px);
}

.nav-btn .btn-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover .btn-icon {
  background: var(--orange);
}

.nav-btn .btn-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--white);
}

/* ── Page title ── */
.page-title {
  text-align: center;
  padding: 44px 24px 32px;
}

.page-title h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
  display: inline-block;
  position: relative;
}

.page-title h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin: 10px auto 0;
}

/* ── Candidates page ── */
.candidates-section {
  padding: 0 24px 64px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Laith – featured row */
.laith-row {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.card-featured {
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 280px;
  box-shadow: 0 8px 32px rgba(19,62,111,.14);
  position: relative;
}

.card-featured::before {
  content: 'رئيس القائمة';
  position: absolute;
  top: 14px;
  right: 0;
  background: var(--orange);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px 4px 10px;
  border-radius: 0 0 0 8px;
}

.card-featured .candidate-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
}

.card-featured .candidate-info {
  padding: 18px 18px 22px;
  text-align: center;
  width: 100%;
  background: var(--blue);
  color: var(--white);
}

.card-featured .candidate-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-featured .candidate-desc {
  font-size: 0.8rem;
  font-weight: 300;
  opacity: .85;
  line-height: 1.6;
}

/* Grid candidates */
.grid-label {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 24px;
  letter-spacing: .02em;
}

.candidates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .25s;
  box-shadow: 0 3px 12px rgba(19,62,111,.06);
}

.card:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(241,142,32,.14);
}

.card .candidate-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
}

.card .candidate-info {
  padding: 14px 14px 18px;
  text-align: center;
  width: 100%;
}

.card .candidate-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 5px;
}

.card .candidate-desc {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.55;
}

/* ── Full-image pages ── */
.full-image-section {
  padding: 0 24px 64px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.full-image-section img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(19,62,111,.12);
  border: 1.5px solid var(--border);
}

/* ── Footer ── */
footer {
  background: var(--blue);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

footer span {
  color: var(--orange);
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .candidates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .nav-btn {
    min-width: 140px;
    padding: 20px 24px;
    font-size: 1rem;
  }

  .page-title h1 {
    font-size: 1.5rem;
  }

  header {
    padding: 12px 16px;
  }

  .header-logo {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .candidates-grid {
    grid-template-columns: 1fr 1fr;
  }
}
