/* Dr. Mohamed Hassan — academic content platform. Light, clean, bilingual (AR/EN). */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Reem+Kufi:wght@500;600;700&display=swap');

:root {
  /* Surfaces */
  --bg: #eef3f8;
  --bg-2: #f4f7fb;
  --card: #ffffff;
  --card-2: #f3f7fb;
  --line: #e2e9f1;
  /* Text */
  --text: #15304c;
  --muted: #647587;
  /* Brand (medical teal + navy). --gold kept as the accent alias for older markup. */
  --brand: #0e7c8a;
  --brand-2: #14a3b3;
  --navy: #123a5e;
  --gold: #0e7c8a;
  --gold-2: #14a3b3;
  --green: #16a34a;
  --red: #e0485b;
  /* Shape */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 58, 94, .10);
  --shadow-sm: 0 4px 14px rgba(18, 58, 94, .07);
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
  --display: 'Reem Kufi', 'IBM Plex Sans Arabic', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 500px at 100% -5%, #dCEAF5 0%, rgba(238,243,248,0) 60%),
    radial-gradient(700px 500px at -5% 0%, #e3f2f4 0%, rgba(238,243,248,0) 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Header */
.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 26px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--navy); }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, var(--brand-2), var(--navy)); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.brand small { color: var(--muted); font-weight: 500; font-size: 11.5px; font-family: var(--font); display:block; }
.nav .spacer { flex: 1; }
.nav a.navlink { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a.navlink:hover { color: var(--navy); text-decoration: none; }
.nav a.navlink.on { color: var(--brand); }

/* Layout */
.wrap { max-width: 1140px; margin: 0 auto; padding: 30px 24px 90px; }
.page-title { font-family: var(--display); font-size: 28px; font-weight: 700; margin: 6px 0 4px; color: var(--navy); }
.page-sub { color: var(--muted); margin: 0 0 26px; }

/* Hero (storefront) */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; margin-bottom: 34px;
  background: linear-gradient(135deg, var(--navy) 0%, #0f4d64 55%, var(--brand) 100%);
  color: #fff; padding: 46px 40px; box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.16) 1px, transparent 0);
  background-size: 22px 22px; mask-image: linear-gradient(to left, #000, transparent 70%);
}
.hero .inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero .avatar {
  width: 108px; height: 108px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--display); font-size: 34px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.35);
  background-size: cover; background-position: center;
}
.hero h1 { font-family: var(--display); font-size: 34px; margin: 0 0 6px; font-weight: 700; }
.hero .role { opacity: .92; font-size: 16px; margin: 0 0 4px; }
.hero .uni { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.16); padding: 5px 12px; border-radius: 999px; margin-top: 8px; }
.hero .tagline { opacity: .9; margin-top: 14px; max-width: 560px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  padding: 11px 18px; border-radius: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; font-size: 15px; transition: .16s; box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: #cdd8e4; transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; border: none; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { color: var(--red); border-color: #f2ccd2; background: #fdf3f4; box-shadow: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }

/* Cards / grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .18s; box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3dde8; }
.thumb {
  height: 148px; display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(135deg, #eaf5f6, #e5eef6); color: var(--brand);
  border-bottom: 1px solid var(--line);
}
.card .body { padding: 16px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card .title { font-weight: 700; font-size: 16px; color: var(--navy); }
.card .desc { color: var(--muted); font-size: 13.5px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { font-weight: 700; color: var(--brand); font-size: 17px; }
.price small { color: var(--muted); font-weight: 500; font-size: 12px; }

/* Badges / chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: #eef3f8; color: var(--muted); border: 1px solid var(--line); }
.chip.owned { color: #0c7a45; border-color: #b6e6cb; background: #eafaf1; }
.chip.gold { color: var(--brand); border-color: #b8e2e8; background: #e8f7f9; }

/* Forms */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.form { display: flex; flex-direction: column; gap: 15px; max-width: 440px; }
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; color: var(--navy); }
input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: #f8fafc; color: var(--text); font-family: inherit; font-size: 15px; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(20,163,179,.14); }
textarea { min-height: 90px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; }
.field { margin: 0; }

/* Alerts */
.alert { padding: 12px 15px; border-radius: 11px; font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.alert.err { background: #fdf2f3; color: #b23245; border: 1px solid #f2ccd2; }
.alert.ok { background: #eafaf1; color: #12784a; border: 1px solid #b6e6cb; }
.alert.info { background: #eaf4fb; color: #1f5f88; border: 1px solid #c4e0f2; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: right; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:hover td { background: #f7fafc; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--brand); }
.stat .l { color: var(--muted); font-size: 13px; }

/* Utility */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { text-align: center; }
.mt { margin-top: 18px; } .mt2 { margin-top: 28px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 11px 16px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--navy); background: #f3f7fb; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

@media (max-width: 640px) {
  .wrap { padding: 22px 16px 70px; }
  /* Nav wraps to a tidy 2 rows on phones instead of overflowing */
  .nav { padding: 10px 14px; gap: 8px 10px; flex-wrap: wrap; }
  .nav .spacer { flex-basis: 100%; flex-grow: 0; height: 0; margin: 0; }
  .brand { font-size: 16px; }
  .brand small { display: none; }
  .nav a.navlink { font-size: 13.5px; }
  .nav .chip { font-size: 11px; padding: 3px 8px; }
  .nav .btn.sm { padding: 6px 10px; font-size: 12px; }
  .hero { padding: 32px 22px; border-radius: 18px; }
  .hero h1 { font-size: 26px; }
  .hero .avatar { width: 84px; height: 84px; font-size: 26px; }
}
/* never let a page scroll sideways on mobile */
@media (max-width: 640px) { html, body { overflow-x: hidden; } }
