:root {
  --brand: #0f766e;
  --brand-dark: #0b5c56;
  --brand-light: #14b8a6;
  --accent: #f59e0b;
  --bg: #f7f9fb;
  --text: #1e293b;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, .navbar-brand { font-family: 'Poppins', 'Segoe UI', sans-serif; }

/* ---------- Navbar ---------- */
.site-navbar {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  padding: 0.75rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.site-navbar .navbar-brand { color: white; font-weight: 700; font-size: 1.5rem; }
.site-navbar .nav-link { color: rgba(255,255,255,0.9); font-weight: 500; }
.site-navbar .nav-link:hover { color: white; }
.site-navbar .navbar-toggler { border-color: rgba(255,255,255,0.4); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 55%, var(--brand-light) 100%);
  color: white;
  padding: 4.5rem 0;
  position: relative;
}
.hero h1 { font-size: 2.6rem; font-weight: 700; }
.hero p.lead { color: rgba(255,255,255,0.9); font-size: 1.15rem; }
.hero .btn-cta {
  background: var(--accent);
  color: #1e293b;
  font-weight: 600;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
}
.hero .btn-cta:hover { background: #d97706; color: white; }

/* ---------- Cards ---------- */
.category-card {
  border: 1px solid #e7ebef;
  border-radius: 14px;
  background: white;
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  /* Fixed height (not height:100%) so every card is identical regardless of
     whether the Arabic label wraps to one line or two - letting Bootstrap's
     row stretch cards to the row's tallest sibling caused uneven cards with
     leftover empty space, which visually collided with the next row. */
  height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(15,118,110,0.18);
  color: var(--brand-dark);
}
.cat-icon {
  width: 56px; height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.category-card .cat-name-ar {
  color: #94a3b8;
  font-size: 0.85rem;
  direction: rtl;
  line-height: 1.3;
}
.category-card .fw-semibold {
  line-height: 1.3;
}

.tech-card {
  border: 1px solid #e7ebef;
  border-radius: 14px;
  background: white;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
  height: 100%;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.tech-card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 12px 28px rgba(15,118,110,0.18); color: var(--text); }
.tech-card .tech-photo {
  width: 100%; height: 140px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
}
.tech-card .tech-photo-placeholder {
  width: 100%; height: 140px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 2.5rem;
}
.tech-card .tech-body { padding: 1rem 1.1rem; }

.section-title { font-weight: 700; margin-bottom: 1.25rem; }

.card-soft {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  font-weight: 500;
}
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: white; }
.btn-outline-brand {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 500;
}
.btn-outline-brand:hover { background: var(--brand); color: white; }

/* ---------- Badges ---------- */
.badge-brand { background: var(--brand); }
.badge-soft { background: #e0f2f1; color: var(--brand-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: #10221f;
  color: #cbd5e1;
  padding: 2rem 0;
  margin-top: 3rem;
}
.site-footer strong { color: white; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; color: #334155; }
.form-select:focus, .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 0.2rem rgba(15,118,110,0.15); }

/* ---------- Rating stars ---------- */
.rating { color: var(--accent); }
