:root {
  --navy: #142b49;
  --blue: #1f5f89;
  --gold: #c7a24b;
  --gold-soft: #f7eed8;
  --ink: #102033;
  --muted: #64748b;
  --line: #dbe4ef;
  --paper: #ffffff;
  --bg: #eef4fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tajawal", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(20, 43, 73, .08), rgba(31, 95, 137, .08)),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr minmax(160px, 240px);
  align-items: center;
  gap: 28px;
  padding: 34px clamp(20px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(20, 43, 73, .98), rgba(31, 95, 137, .94)),
    var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}

.portal-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(199, 162, 75, .72);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .14);
}

.portal-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.portal-nav a.active {
  background: var(--navy);
  color: #f0cd6d;
}

.brand-card {
  height: 112px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(199, 162, 75, .75);
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(4, 14, 29, .22);
}

.brand-card img {
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
  display: block;
}

.brand-department img {
  max-height: 76px;
}

.hero-copy {
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #f0cd6d;
  font-size: 15px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-copy p:last-child {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
  line-height: 1.8;
  font-weight: 700;
}

.portal {
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 56px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 0;
}

.card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 162, 75, .7);
  box-shadow: 0 20px 42px rgba(15, 23, 42, .14);
}

.card.primary {
  background:
    linear-gradient(160deg, rgba(20, 43, 73, .97), rgba(31, 95, 137, .94)),
    var(--navy);
  color: #fff;
  border-color: rgba(199, 162, 75, .8);
}

.tag {
  align-self: flex-start;
  padding: 7px 12px;
  border: 1px solid rgba(199, 162, 75, .7);
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a5b10;
  font-size: 13px;
  font-weight: 900;
}

.primary .tag {
  background: rgba(255, 255, 255, .12);
  color: #f0cd6d;
}

.card h2 {
  margin: 24px 0 12px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 900;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 600;
}

.primary p {
  color: rgba(255, 255, 255, .78);
}

.card strong {
  margin-top: auto;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}

.primary strong {
  color: #f0cd6d;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .brand-card {
    width: min(260px, 100%);
    margin: 0 auto;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .portal {
    margin-top: -24px;
  }

  .portal-nav {
    left: 10px;
    right: 10px;
    transform: none;
    overflow-x: auto;
    justify-content: flex-start;
  }
}
