:root {
  --raddym-dark-blue: #0a2463;
  --raddym-blue: #3e7cb1;
  --raddym-blue-light: #eaf2fb;
  --text-dark: #14213d;
  --text-muted: #5c6b80;
  --border: #d9e3f0;
  --danger: #b3261e;
  --success: #1b6e3c;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: #f6f9fd;
}

a { color: var(--raddym-blue); }

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

/* Navbar */
.navbar {
  background: var(--raddym-dark-blue);
  color: white;
  padding: 14px 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar .brand {
  color: white;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
}
.navbar nav a {
  color: #dbe7f6;
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px;
}
.navbar nav a:hover { color: white; }

/* Flash messages */
.flash-list { list-style: none; margin: 16px 0 0; padding: 0; }
.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
}
.flash.error { background: #fdecea; color: var(--danger); border: 1px solid #f3c1bc; }
.flash.success { background: #e6f4ea; color: var(--success); border: 1px solid #b7ddc3; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--raddym-dark-blue), var(--raddym-blue));
  color: white;
  text-align: center;
  padding: 60px 20px 70px;
}
.hero h1 { font-size: 34px; margin: 0 0 10px; }
.hero p { font-size: 16px; opacity: 0.9; max-width: 560px; margin: 0 auto 26px; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary { background: white; color: var(--raddym-dark-blue); }
.btn-primary:hover { background: var(--raddym-blue-light); }
.btn-secondary { background: var(--raddym-blue); color: white; }
.btn-block { display: block; width: 100%; text-align: center; }

.section-title {
  font-size: 22px;
  margin: 40px 0 18px;
  color: var(--raddym-dark-blue);
}

/* University grid/cards */
.university-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.university-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  transition: box-shadow 0.15s, transform 0.15s;
}
.university-card:hover { box-shadow: 0 6px 18px rgba(10,36,99,0.12); transform: translateY(-2px); }

.uni-photo-placeholder {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--raddym-dark-blue), var(--raddym-blue));
}
.uni-card-body { padding: 12px 14px; }
.uni-card-body h3 { margin: 0 0 4px; font-size: 16px; }
.uni-card-body p { margin: 0; font-size: 13px; color: var(--text-muted); }

.match-score {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.match-score.Safety { background: #e6f4ea; color: var(--success); }
.match-score.Target { background: #fff4e0; color: #8a5c00; }
.match-score.Reach { background: #fdecea; color: var(--danger); }

/* Forms */
.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  margin: 30px auto;
}
.form-card h1 { margin-top: 0; color: var(--raddym-dark-blue); font-size: 24px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-muted); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* University detail */
.uni-detail-hero {
  height: 200px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--raddym-dark-blue), var(--raddym-blue));
  margin: 24px 0;
}
.uni-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.uni-info-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.uni-info-item .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.uni-info-item .value { font-size: 18px; font-weight: 700; color: var(--text-dark); }

.ai-comment-box {
  background: var(--raddym-blue-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--raddym-blue);
  border-radius: var(--radius);
  padding: 20px;
  margin: 30px 0;
}
.ai-comment-box h3 { margin-top: 0; color: var(--raddym-dark-blue); }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
