/* MyeDegree.com design system. University standard: deep navy, gold, cream, serif display. */

:root {
  --navy: #0e2a47;
  --navy-dark: #0a1f36;
  --navy-soft: #173a5c;
  --gold: #c9a227;
  --gold-dark: #a8861d;
  --gold-light: #f3e3a1;
  --cream: #f7f5f0;
  --paper: #fffdf8;
  --ink: #1c2430;
  --muted: #5b6b7c;
  --line: #e3ddd2;
  --green: #1e7d4f;
  --green-bg: #e6f4ec;
  --red: #b3261e;
  --red-bg: #fdecea;
  --amber: #8a6100;
  --amber-bg: #fdf3d7;
  --slate: #4a6b8a;
  --slate-bg: #e9eff4;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(14, 42, 71, 0.08);
  --shadow-lift: 0 10px 26px rgba(14, 42, 71, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header */

.site-header { background: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-name { font-family: "Playfair Display", Georgia, serif; font-size: 1.7rem; font-weight: 700; color: var(--navy); line-height: 1; }
.brand-name span { color: var(--gold-dark); }
.brand-tag { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }
.main-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover, .main-nav a.active { background: var(--cream); color: var(--gold-dark); }

/* Hero */

.hero {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #fff; padding: 64px 0 56px;
}
.hero h1 { color: #fff; font-size: 2.9rem; margin-bottom: 0.35em; }
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero p.lede { font-size: 1.2rem; color: #d7e2ec; max-width: 720px; }
.hero-rule { width: 72px; height: 4px; background: var(--gold); border: 0; margin: 0 0 22px; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 30px; }
.hero-stat b { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 2rem; color: var(--gold-light); line-height: 1.1; }
.hero-stat span { font-size: 0.9rem; color: #c3d2e0; }
.hero-search { margin-top: 30px; display: flex; gap: 10px; max-width: 640px; }
.hero-search input {
  flex: 1; padding: 13px 16px; font-size: 1rem; border: 1px solid #33506e;
  border-radius: 10px; background: #fff; color: var(--ink);
}
.btn {
  display: inline-block; background: var(--gold); color: var(--navy-dark);
  font-weight: 700; text-decoration: none; padding: 13px 24px; border-radius: 10px;
  border: 0; cursor: pointer; font-size: 1rem; line-height: 1.2;
}
.btn:hover { background: var(--gold-light); color: var(--navy-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* Sections */

.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem;
  font-weight: 700; color: var(--gold-dark); margin-bottom: 6px;
}

/* Cards */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
a.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
a.card:hover h3 { color: var(--gold-dark); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.card .meta { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .deadline { font-weight: 700; color: var(--navy); font-size: 0.95rem; }

/* Badges */

.badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge-open { background: var(--green-bg); color: var(--green); }
.badge-soon { background: var(--red-bg); color: var(--red); }
.badge-closed { background: #eceae6; color: #6b6f76; }
.badge-tba { background: var(--slate-bg); color: var(--slate); }
.badge-gold { background: var(--gold-light); color: var(--amber); }

/* Country and level tiles */

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tile {
  background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px;
  text-decoration: none; display: block; min-height: 110px;
}
.tile:hover { background: var(--navy-soft); }
.tile b { font-family: "Playfair Display", Georgia, serif; font-size: 1.35rem; display: block; color: #fff; }
.tile span { color: #c3d2e0; font-size: 0.9rem; }
.tile .count { color: var(--gold-light); font-weight: 700; }

/* Scholarship page */

.crumbs { font-size: 0.9rem; color: var(--muted); margin: 22px 0 6px; }
.crumbs a { color: var(--muted); }
.scholar-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 22px; }
.scholar-head h1 { font-size: 2.1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; margin: 20px 0 0; }
.facts div { border-top: 2px solid var(--gold); padding-top: 10px; }
.facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 4px 0 0; font-weight: 600; color: var(--navy); }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 22px; }
.prose h2 { margin-top: 4px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: 12px 0 12px 52px; position: relative; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 12px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
}
.official-box {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 24px 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.official-box p { margin: 0; color: #d7e2ec; flex: 1; min-width: 240px; }
.official-box b { color: #fff; }
.verified { font-size: 0.88rem; color: var(--muted); }
.note {
  background: var(--amber-bg); border-left: 4px solid var(--gold);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin-bottom: 22px;
}

/* Finder */

.finder-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.finder-bar select, .finder-bar input {
  padding: 11px 14px; font-size: 1rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.finder-count { color: var(--muted); margin-bottom: 16px; }

/* Footer */

.site-footer { background: var(--navy-dark); color: #c3d2e0; padding: 48px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 28px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer a { color: #c3d2e0; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold-light); }
.footer-note { border-top: 1px solid #23405e; padding-top: 20px; font-size: 0.88rem; color: #8fa5b8; }
.footer-note a { display: inline; color: #8fa5b8; text-decoration: underline; }

/* Ad slots */

.ad-slot { margin: 28px 0; text-align: center; min-height: 90px; }

/* Legal pages */

.legal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin: 28px 0; }
.legal h1 { margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

/* Comparison tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; background: #fff; }
table.compare { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.95rem; margin-bottom: 0; }
table.compare th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-family: "Playfair Display", Georgia, serif; font-size: 1rem; white-space: nowrap; }
table.compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare tr:last-child td { border-bottom: 0; }
table.compare tr:hover td { background: var(--cream); }
table.compare td a { font-weight: 600; }
table.compare .badge { margin-top: 6px; }

/* Responsive */

@media (max-width: 720px) {
  h1 { font-size: 1.9rem; }
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 2.1rem; }
  .hero-stats { gap: 22px; }
  .main-nav { margin-left: 0; }
  .header-inner { gap: 10px; }
  .scholar-head, .prose { padding: 20px; }
  .hero-search { flex-direction: column; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .hero-search { display: none; }
  body { background: #fff; }
}
