:root {
  --primary: #003366;
  --primary-light: #00509e;
  --accent: #cc0000;
  --accent-light: #e60000;
  --bg: #eef0f3;
  --card-bg: #ffffff;
  --text: #333333;
  --muted: #666666;
  --border: #cccccc;
  --success: #28a745;
  --danger: #dc3545;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }

html[dir="rtl"] body { font-family: Tahoma, Arial, sans-serif; }
html[dir="ltr"] body { font-family: Arial, sans-serif; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow { max-width: 760px; }

/* Navbar */
.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
}

.brand-icon { font-size: 1.4rem; }

.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  text-decoration: none;
  font-weight: 700;
  color: var(--primary-light);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

.btn:hover { opacity: 0.9; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-google {
  background: white;
  color: #444;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

/* Hero */
.hero {
  padding: 70px 0 50px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
  color: white;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text { flex: 1.2; min-width: 300px; }

.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  font-weight: 800;
}

.hero-text p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero .btn-outline { color: white; border-color: rgba(255,255,255,0.6); }

.hero-visual {
  flex: 1;
  min-width: 260px;
  display: flex;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.hero-card {
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  backdrop-filter: blur(6px);
}

.hero-card-2 { margin-top: 30px; }
.hero-card-3 { margin-top: -20px; }

/* Sections */
.section { padding: 60px 0; }
.section-alt { background: #eef2f7; }

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 36px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-icon { font-size: 2.2rem; margin-bottom: 12px; }

.feature-card h3 { margin: 8px 0; color: var(--primary); }
.feature-card p { color: var(--muted); font-size: 0.92rem; }

/* Scholarship cards */
.scholarships-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.scholarship-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.scholarship-flag {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.scholarship-flag.lg { font-size: 0.9rem; padding: 6px 16px; }

.scholarship-card h3 { margin: 6px 0; color: var(--primary); font-size: 1.15rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
.muted.small { font-size: 0.8rem; }
.deadline { font-size: 0.85rem; color: var(--danger); margin: 10px 0; }

.center-btn { text-align: center; margin-top: 30px; }

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.input {
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
}

.filters .input { flex: 1; min-width: 180px; }

/* Details page */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.details-card, .form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.description { margin: 20px 0 28px; }

/* Forms */
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 700; font-size: 0.9rem; }
.form-row-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row .input, .form-row textarea.input { width: 100%; }
.form-actions { display: flex; gap: 14px; margin-top: 24px; }

/* Table */
.table-wrap { overflow-x: auto; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.table th { background: #eef2f7; font-weight: 700; color: var(--primary); }
.actions-cell { display: flex; gap: 8px; }
.actions-cell form { display: inline; }

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.badge-pending { background: #feebc8; color: #9c4221; }
.badge-accepted { background: #c6f6d5; color: #276749; }
.badge-rejected { background: #fed7d7; color: #9b2c2c; }

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: 10px;
  margin: 16px auto;
  font-weight: 600;
}
.alert-warning { background: #fefcbf; color: #744210; }
.alert-success { background: #c6f6d5; color: #276749; }

/* Footer */
.footer {
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .form-row-group { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 1.8rem; }
}
