/* ============================================================
   DoctoralHub – Main Stylesheet
   Design: Deep Navy + Gold editorial academic aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,800;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --navy: #0a1628;
  --navy-mid: #112240;
  --navy-light: #1a3260;
  --gold: #c9963a;
  --gold-light: #e8b96a;
  --cream: #f9f4ec;
  --cream-dark: #ede6d8;
  --white: #ffffff;
  --text-dark: #0a1628;
  --text-mid: #374461;
  --text-soft: #6b7a99;
  --border: #ddd5c5;
  --green: #1a7a4e;
  --green-light: #e8f5ee;
  --shadow-sm: 0 2px 8px rgba(10,22,40,.08);
  --shadow-md: 0 6px 24px rgba(10,22,40,.12);
  --shadow-lg: 0 16px 48px rgba(10,22,40,.16);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }

/* ── TOPBAR ── */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  font-size: 12px;
  padding: 7px 0;
  text-align: center;
  letter-spacing: .02em;
}
.topbar a { color: var(--gold-light); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ── HEADER ── */
.site-header {
  background: var(--navy-mid);
  position: sticky; top: 0; z-index: 200;
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 800;
  color: var(--navy);
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: var(--white); letter-spacing: -.01em;
}
.logo-text span { color: var(--gold); }

.main-nav { display: flex; gap: 4px; align-items: center; flex: 1; }
.main-nav a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: all .2s; white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-nav a.active { color: var(--gold); }

.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }

/* Buttons */
.btn-outline-sm {
  border: 1.5px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.85); background: transparent;
  padding: 6px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.btn-outline-sm:hover { border-color: var(--gold); color: var(--gold); }

.btn-gold-sm {
  background: var(--gold); color: var(--navy);
  border: none; padding: 7px 18px; border-radius: 6px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .2s; text-decoration: none; white-space: nowrap;
  display: inline-block;
}
.btn-gold-sm:hover { background: var(--gold-light); color: var(--navy); }

.btn-gold {
  background: var(--gold); color: var(--navy);
  border: none; border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700;
  padding: 12px 24px; cursor: pointer;
  transition: all .2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }

/* Mobile nav */
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a {
  padding: 14px 20px; text-decoration: none; color: var(--text-dark);
  font-weight: 500; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.mobile-nav a:hover { background: var(--cream); color: var(--navy); }
.mobile-nav hr { border-color: var(--border); }

/* Dropdown */
.dropdown-menu {
  border: 1.5px solid var(--border); box-shadow: var(--shadow-md);
  border-radius: 10px; overflow: hidden;
}
.dropdown-item { font-size: 14px; padding: 10px 16px; }
.dropdown-item:hover { background: var(--cream); color: var(--navy); }
.dropdown-toggle::after { display: none; }

/* ── HERO ── */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 60%, #1e3a5f 100%);
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23c9963a' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(201,150,58,.15); border: 1px solid rgba(201,150,58,.4);
  color: var(--gold-light); font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 100px;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800; color: var(--white);
  line-height: 1.15; max-width: 760px; margin: 0 auto 12px;
  letter-spacing: -.02em;
}
.hero-title em { color: var(--gold); font-style: normal; }
.hero-subtitle {
  color: rgba(255,255,255,.6);
  font-size: 17px; max-width: 540px; margin: 0 auto 36px;
}

.hero-stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700; color: var(--gold);
  display: block;
}
.hero-stat .lbl { font-size: 12px; color: rgba(255,255,255,.5); letter-spacing: .04em; }

/* ── SEARCH BOX ── */
.search-box {
  max-width: 780px; margin: 0 auto;
  background: var(--white); border-radius: 12px;
  padding: 6px; display: flex; gap: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
}
.search-input {
  flex: 1; border: none; outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; color: var(--text-dark); padding: 12px 16px;
  background: transparent; min-width: 0;
}
.search-input::placeholder { color: var(--text-soft); }
.search-select {
  border: none; border-left: 1.5px solid var(--border);
  outline: none; background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--text-mid);
  padding: 12px 14px; cursor: pointer; white-space: nowrap;
}
.search-btn {
  background: var(--gold); border: none; border-radius: 8px;
  color: var(--navy); font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; padding: 12px 24px;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.search-btn:hover { background: var(--gold-light); }

.search-tags { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; color: rgba(255,255,255,.55); font-size: 13px; }
.search-tag {
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
  font-size: 12px; padding: 5px 14px; border-radius: 100px;
  cursor: pointer; transition: all .2s; border: 1px solid transparent;
  text-decoration: none;
}
.search-tag:hover { background: rgba(201,150,58,.2); border-color: var(--gold); color: var(--gold-light); }

/* Search page header */
.search-page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 36px 0;
  border-bottom: 2px solid var(--gold);
}
.search-page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800; color: var(--white);
  letter-spacing: -.02em; margin-bottom: 20px;
}
.search-page-title em { color: var(--gold); font-style: normal; }
.search-box-inline { max-width: 100%; }

/* ── LAYOUT ── */
.two-col {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  padding-bottom: 56px;
}
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

/* ── SECTION HEADERS ── */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700; color: var(--text-dark); letter-spacing: -.02em;
}
.section-title span { color: var(--gold); }
.view-all {
  font-size: 13px; font-weight: 600; color: var(--gold);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.view-all:hover { text-decoration: underline; }

/* ── SUBJECTS SECTION ── */
.subjects-section { padding: 56px 0 48px; }
.subjects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px;
}
.subject-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 20px 18px;
  cursor: pointer; transition: all .22s;
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; position: relative; overflow: hidden;
}
.subject-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s;
}
.subject-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.subject-card:hover::after { transform: scaleX(1); }
.subject-icon { font-size: 26px; line-height: 1; }
.subject-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.subject-count { font-size: 12px; color: var(--text-soft); }

/* ── PHD CARDS ── */
.phd-list { display: flex; flex-direction: column; gap: 16px; }
.phd-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 22px 24px;
  transition: all .22s; position: relative;
}
.phd-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.phd-card-top { display: flex; align-items: flex-start; gap: 16px; }
.uni-logo {
  width: 52px; height: 52px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 17px; font-weight: 700; flex-shrink: 0;
}
.uni-logo-img { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; }
.phd-meta { flex: 1; min-width: 0; }
.phd-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px; font-weight: 600; color: var(--text-dark);
  line-height: 1.35; margin-bottom: 6px;
  text-decoration: none; display: block;
}
.phd-title:hover { color: var(--gold); }
.phd-info { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.phd-tag { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-soft); }
.phd-tag i { font-size: 12px; }
.phd-desc { font-size: 13.5px; color: var(--text-mid); line-height: 1.55; }

.phd-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--cream-dark);
  flex-wrap: wrap; gap: 10px;
}
.phd-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; letter-spacing: .03em; }
.badge-funded { background: var(--green-light); color: var(--green); }
.badge-competition { background: #e8effe; color: #2d50c8; }
.badge-partial { background: #fef3e2; color: #a05c00; }
.badge-self { background: #f5f5f5; color: #666; }
.badge-deadline { background: #fef3e2; color: #a05c00; }
.badge-new { background: #e8effe; color: #2d50c8; }
.badge-subject { background: var(--cream-dark); color: var(--text-mid); text-decoration: none; }
.badge-tag { background: #f3f0fa; color: #7c3aed; }
.badge-lg { font-size: 13px; padding: 5px 14px; }

.phd-card-actions { display: flex; align-items: center; gap: 10px; }
.phd-added { font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.save-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 6px; padding: 5px 10px;
  color: var(--text-soft); font-size: 15px;
  cursor: pointer; transition: all .2s; text-decoration: none;
  display: inline-flex; align-items: center;
}
.save-btn:hover, .save-btn.saved { border-color: var(--gold); color: var(--gold); }
.phd-apply {
  background: var(--navy); color: #fff;
  border: none; border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 7px 16px; cursor: pointer; transition: all .2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.phd-apply:hover { background: var(--navy-light); color: #fff; }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 0 20px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-mid); }
.filter-chip {
  display: flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--border); background: var(--white);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 500;
  color: var(--text-mid); cursor: pointer; transition: all .2s;
  user-select: none; text-decoration: none;
}
.filter-chip:hover { border-color: var(--gold); color: var(--text-dark); }
.filter-chip.active { border-color: var(--gold); background: #fdf3e3; color: var(--navy); }
.filter-select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; font-weight: 500; color: var(--text-mid);
  background: var(--white); outline: none; cursor: pointer;
}
.filter-select:focus { border-color: var(--gold); }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.sidebar-card-head {
  background: var(--navy); padding: 13px 18px;
  font-family: 'Playfair Display', serif;
  font-size: 15px; font-weight: 600; color: var(--white);
}
.sidebar-card-body { padding: 16px 18px; }

/* Open days */
.openday-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--cream-dark);
}
.openday-item:last-child { border-bottom: none; padding-bottom: 0; }
.od-date {
  background: var(--gold); color: var(--navy);
  min-width: 48px; height: 52px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.od-date .day { font-size: 20px; line-height: 1; }
.od-date .mon { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.od-info { flex: 1; min-width: 0; }
.od-uni { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; }
.od-title { font-size: 12px; color: var(--text-mid); line-height: 1.4; margin-bottom: 5px; }
.od-loc { font-size: 11px; color: var(--text-soft); }

/* Countries */
.countries-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.country-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 8px; background: var(--cream);
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.country-item:hover { background: var(--cream-dark); }
.country-flag { font-size: 22px; line-height: 1; }
.country-name { font-size: 13px; font-weight: 600; color: var(--text-dark); line-height: 1.2; }
.country-count { font-size: 11px; color: var(--text-soft); }

/* ── INSTITUTIONS ── */
.institutions-section { padding: 0 0 56px; }
.inst-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px;
}
.inst-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 22px;
  text-align: center; cursor: pointer; transition: all .22s;
  text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.inst-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.inst-avatar {
  width: 60px; height: 60px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 800;
}
.inst-avatar-lg { width: 80px; height: 80px; font-size: 28px; border-radius: 16px; }
.inst-name { font-size: 14px; font-weight: 600; color: var(--text-dark); text-align: center; }
.inst-location { font-size: 12px; color: var(--text-soft); }
.inst-phds { background: var(--cream); color: var(--text-mid); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 100px; }

/* ── INSTITUTION DETAIL HEADER ── */
.inst-detail-header { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* ── ADVICE SECTION ── */
.advice-section { background: var(--navy); padding: 56px 0; }
.advice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.advice-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 24px;
  transition: all .22s; cursor: pointer; text-decoration: none; display: block;
}
.advice-card:hover { background: rgba(201,150,58,.12); border-color: var(--gold); }
.advice-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.advice-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.advice-desc { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.55; }

/* Light advice cards (for study guides / funding pages) */
.advice-card-light {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 24px;
  transition: all .22s; height: 100%;
}
.advice-card-light:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.advice-card-light .advice-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.advice-card-light .advice-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.advice-card-light .advice-desc { font-size: 13.5px; color: var(--text-mid); line-height: 1.6; }

/* ── FUNDING BANNER ── */
.funding-banner {
  background: linear-gradient(135deg, #f9f0e1 0%, #fdf6ee 100%);
  border: 2px solid var(--gold); border-radius: 12px;
  padding: 28px 32px; display: flex; align-items: center; gap: 24px;
  margin: 0 0 48px; flex-wrap: wrap;
}
.funding-icon { font-size: 48px; flex-shrink: 0; }
.funding-content { flex: 1; min-width: 200px; }
.funding-content h3 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.funding-content p { font-size: 14px; color: var(--text-mid); }

/* ── NEWSLETTER ── */
.newsletter-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 48px 0;
}
.newsletter-inner {
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
}
.newsletter-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; color: var(--white); margin-bottom: 4px;
}
.newsletter-text p { font-size: 14px; color: rgba(255,255,255,.6); }
.newsletter-form-inline { display: flex; gap: 8px; flex: 1; min-width: 280px; flex-wrap: wrap; }
.newsletter-input {
  border: none; border-radius: 6px; padding: 11px 14px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none; flex: 1; min-width: 150px;
}
.btn-subscribe {
  background: var(--gold); color: var(--navy);
  border: none; border-radius: 6px; padding: 11px 20px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-subscribe:hover { background: var(--gold-light); }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 13px; font-weight: 600; color: var(--text-mid);
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--gold); border-color: var(--gold); color: var(--navy); }

/* ── PHD DETAIL PAGE ── */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding-bottom: 56px; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; padding: 32px; }
.detail-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.detail-inst-logo, .detail-inst-logo-placeholder {
  width: 70px; height: 70px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 800;
}
.detail-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 3vw, 28px); font-weight: 700;
  color: var(--text-dark); line-height: 1.3; margin-bottom: 10px;
}
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.detail-meta-item { font-size: 13px; color: var(--text-soft); display: flex; align-items: center; gap: 5px; text-decoration: none; }
.detail-meta-item:hover { color: var(--gold); }

.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-summary {
  font-size: 16px; color: var(--text-mid); line-height: 1.65;
  border-left: 3px solid var(--gold); padding-left: 16px; margin-bottom: 28px;
}
.detail-section { margin-bottom: 28px; }
.detail-section-title {
  font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600;
  color: var(--text-dark); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--cream-dark);
}
.detail-body { font-size: 14.5px; color: var(--text-mid); line-height: 1.7; }
.detail-body h3 { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; color: var(--text-dark); margin: 16px 0 8px; }
.detail-body ul { padding-left: 20px; margin: 8px 0; }
.detail-body li { margin-bottom: 4px; }
.detail-body p { margin-bottom: 12px; }

.eligibility-row { display: flex; gap: 16px; flex-wrap: wrap; }
.eligibility-item { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.eligibility-item.eligible { color: var(--green); }
.eligibility-item.not-eligible { color: #c0392b; }

.key-info-list { display: flex; flex-direction: column; gap: 0; }
.key-info-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--cream-dark); }
.key-info-row:last-child { border-bottom: none; }
.key-info-row dt { font-size: 13px; font-weight: 600; color: var(--text-soft); display: flex; align-items: center; gap: 5px; }
.key-info-row dd { font-size: 13px; font-weight: 600; color: var(--text-dark); text-align: right; }

.btn-outline-save {
  border: 1.5px solid var(--border); color: var(--text-mid);
  background: transparent; padding: 10px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-outline-save:hover { border-color: var(--gold); color: var(--gold); }

.detail-actions { display: flex; flex-direction: column; gap: 8px; }

/* ── AUTH PAGES ── */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 40px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; justify-content: center; }
.auth-title {
  font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700;
  color: var(--text-dark); text-align: center; margin-bottom: 8px;
}
.auth-subtitle { font-size: 14px; color: var(--text-soft); text-align: center; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--text-soft); }
.auth-footer a { color: var(--gold); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── FORM CONTROLS ── */
.form-control, .form-select {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 14px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--text-dark); background: var(--white);
  transition: border-color .2s; outline: none;
}
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,150,58,.12); }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-mid); margin-bottom: 5px; }

/* ── FOOTER ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.6); padding-top: 56px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; text-decoration: none;
}
.footer-logo-icon {
  width: 32px; height: 32px; background: var(--gold); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 800; color: var(--navy);
}
.footer-logo-text { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--white); }
.footer-logo-text span { color: var(--gold); }
.footer-desc { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.5); margin-bottom: 18px; }

.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 34px; height: 34px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); text-decoration: none; font-size: 15px;
  transition: all .2s;
}
.social-btn:hover { border-color: var(--gold); color: var(--gold); }
.footer-col h4 {
  font-family: 'Playfair Display', serif;
  font-size: 14px; font-weight: 700; color: var(--white);
  margin-bottom: 14px; letter-spacing: .02em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: rgba(255,255,255,.5); text-decoration: none; font-size: 13px; transition: color .2s; }
.footer-col ul a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,.35);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--gold); }

/* ── BREADCRUMBS ── */
.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--gold); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--text-soft); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-soft); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--text-dark); margin-bottom: 8px; }

/* ── ALERTS ── */
.alert { border-radius: 8px; font-size: 14px; }
.alert-success { background: var(--green-light); border-color: var(--green); color: var(--green); }
.alert-info { background: #e8effe; border-color: #2d50c8; color: #2d50c8; }
.alert-warning { background: #fef3e2; border-color: #a05c00; color: #a05c00; }
.alert-error, .alert-danger { background: #fdecea; border-color: #c0392b; color: #c0392b; }

/* ── UTILITIES ── */
.w-100 { width: 100%; }
.d-block { display: block; }
.text-center { text-align: center; }
.text-muted { color: var(--text-soft) !important; }
.text-danger { color: #c0392b !important; }
.ms-auto { margin-left: auto; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 40px; }
.py-5 { padding-top: 40px; padding-bottom: 40px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.flex-1 { flex: 1; }
.small { font-size: 13px; }
.fs-1 { font-size: 2.5rem; }
.fw-semibold { font-weight: 600; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.p-4 { padding: 24px; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > .container > * { animation: fadeUp .6s ease forwards; opacity: 0; }
.hero .hero-badge { animation-delay: .1s; }
.hero .hero-title { animation-delay: .2s; }
.hero .hero-subtitle { animation-delay: .3s; }
.hero .hero-stats { animation-delay: .4s; }
.hero .search-box { animation-delay: .5s; }
.hero .search-tags { animation-delay: .6s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .search-box { flex-wrap: wrap; }
  .search-select { border-left: none; border-top: 1.5px solid var(--border); }
  .hero-stats { gap: 24px; }
  .funding-banner { flex-direction: column; text-align: center; }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .detail-header { flex-direction: column; }
  .subjects-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .phd-card-top { flex-direction: column; }
  .inst-detail-header { flex-direction: column; }
}

/* ============================================================
   MULTI-OPPORTUNITY EXTENSION STYLES
   ============================================================ */

/* ── OPPORTUNITY TYPE TABS (Hero) ── */
.opp-tabs {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 28px;
}
.opp-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 20px; border-radius: 12px;
  text-decoration: none; transition: all .22s;
  border: 2px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  min-width: 110px;
}
.opp-tab:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.12); }
.opp-tab-icon { font-size: 22px; line-height: 1; }
.opp-tab span:nth-child(2) { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); white-space: nowrap; }
.opp-tab-count { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; }

.opp-tab--phd:hover        { border-color: var(--gold); }
.opp-tab--phd .opp-tab-count      { background: rgba(201,150,58,.25); color: var(--gold-light); }
.opp-tab--masters:hover    { border-color: #7c3aed; }
.opp-tab--masters .opp-tab-count  { background: rgba(124,58,237,.25); color: #c4b5fd; }
.opp-tab--scholarship:hover { border-color: #d4ac0d; }
.opp-tab--scholarship .opp-tab-count { background: rgba(212,172,13,.25); color: #fde68a; }
.opp-tab--grant:hover      { border-color: #1a7a4e; }
.opp-tab--grant .opp-tab-count    { background: rgba(26,122,78,.25); color: #6ee7b7; }
.opp-tab--summer:hover     { border-color: #f59e0b; }
.opp-tab--summer .opp-tab-count   { background: rgba(245,158,11,.25); color: #fcd34d; }

/* ── OPPORTUNITY SECTION HEADERS ── */
.opp-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: 10px; margin-bottom: 16px;
}
.opp-section-label {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; color: var(--text-dark);
}
.opp-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}

.opp-header--phd        { background: #fdf8f0; border-left: 4px solid var(--gold); }
.opp-dot--phd           { background: var(--gold); }
.opp-header--masters    { background: #f5f0ff; border-left: 4px solid #7c3aed; }
.opp-dot--masters       { background: #7c3aed; }
.opp-header--scholarship { background: #fffbeb; border-left: 4px solid #d4ac0d; }
.opp-dot--scholarship   { background: #d4ac0d; }
.opp-header--grant      { background: #f0fdf4; border-left: 4px solid #1a7a4e; }
.opp-dot--grant         { background: #1a7a4e; }
.opp-header--summer     { background: #fffbf0; border-left: 4px solid #f59e0b; }
.opp-dot--summer        { background: #f59e0b; }

/* ── CARD ACCENT BORDERS by type ── */
.phd-card--masters:hover    { border-color: #7c3aed; }
.phd-card--grant:hover      { border-color: #1a7a4e; }
.phd-card--summer:hover     { border-color: #f59e0b; }
.phd-card--scholarship:hover { border-color: #d4ac0d; }

/* ── UNI LOGO VARIANTS ── */
.uni-logo--grant      { background: #e8f5ee; color: #1a7a4e; width:52px; height:52px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-family:'Playfair Display',serif; font-size:13px; font-weight:700; flex-shrink:0; letter-spacing:.02em; }
.uni-logo--scholarship { background: #fffbeb; color: #a16207; width:52px; height:52px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-family:'Playfair Display',serif; font-size:13px; font-weight:700; flex-shrink:0; }
.uni-logo--summer     { background: #fff8e1; color: #f59e0b; width:52px; height:52px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0; }

/* ── APPLY BUTTON VARIANTS ── */
.phd-apply--masters    { background: #7c3aed; }
.phd-apply--masters:hover { background: #6d28d9; color:#fff; }
.phd-apply--grant      { background: #1a7a4e; }
.phd-apply--grant:hover { background: #166040; color:#fff; }
.phd-apply--summer     { background: #d97706; }
.phd-apply--summer:hover { background: #b45309; color:#fff; }
.phd-apply--scholarship { background: #a16207; }
.phd-apply--scholarship:hover { background: #854d0e; color:#fff; }

/* ── BADGE VARIANTS ── */
.badge-masters-type    { background: #f3e8fe; color: #7c3aed; }
.badge-grant-type      { background: #e8f5ee; color: #1a7a4e; }
.badge-summer-type     { background: #fff8e1; color: #d97706; }
.badge-scholarship-type { background: #fffbeb; color: #a16207; }

/* ── SEARCH PAGE HEADER VARIANTS ── */
.search-page-header--masters {
  background: linear-gradient(135deg, #2d1b69 0%, #4c1d95 100%);
  border-bottom-color: #7c3aed;
}
.search-page-header--grant {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  border-bottom-color: #1a7a4e;
}
.search-page-header--summer {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  border-bottom-color: #f59e0b;
}
.search-page-header--scholarship {
  background: linear-gradient(135deg, #713f12 0%, #854d0e 100%);
  border-bottom-color: #d4ac0d;
}

/* ── SEARCH BTN VARIANTS ── */
.search-btn--masters    { background: #7c3aed; color: #fff; }
.search-btn--masters:hover { background: #6d28d9; }
.search-btn--grant      { background: #1a7a4e; color: #fff; }
.search-btn--grant:hover { background: #166040; }
.search-btn--summer     { background: #d97706; color: #fff; }
.search-btn--summer:hover { background: #b45309; }
.search-btn--scholarship { background: #a16207; color: #fff; }
.search-btn--scholarship:hover { background: #854d0e; }

/* ── CATEGORY LINKS (sidebar) ── */
.category-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 8px; text-decoration: none;
  margin-bottom: 6px; transition: all .18s; border: 1.5px solid transparent;
}
.category-link:last-child { margin-bottom: 0; }
.category-link > span:first-child { font-size: 22px; line-height: 1; flex-shrink: 0; }
.category-link > div { flex: 1; }
.category-link > div strong { display: block; font-size: 14px; font-weight: 600; color: var(--text-dark); }
.category-link > div small { font-size: 11px; color: var(--text-soft); }
.category-link > i { color: var(--text-soft); font-size: 13px; flex-shrink: 0; }
.category-link:hover > i { transform: translateX(3px); transition: transform .15s; }

.category-link--phd        { background: #fdf8f0; }
.category-link--phd:hover  { border-color: var(--gold); background: #fdf3e3; }
.category-link--masters    { background: #f9f5ff; }
.category-link--masters:hover { border-color: #7c3aed; background: #f3e8fe; }
.category-link--scholarship { background: #fffef5; }
.category-link--scholarship:hover { border-color: #d4ac0d; background: #fffbeb; }
.category-link--grant      { background: #f0fdf8; }
.category-link--grant:hover { border-color: #1a7a4e; background: #e8f5ee; }
.category-link--summer     { background: #fffef0; }
.category-link--summer:hover { border-color: #f59e0b; background: #fff8e1; }

/* ── FOOTER LINKS UPDATE ── */
.footer-col ul li a { line-height: 1.8; }
