/* =========================================================
   Top Universities World — Global Stylesheet
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root{
  --navy:#0F1F3D;
  --navy-light:#1A3159;
  --ivory:#F7F5F0;
  --ivory-dim:#F0ECE2;
  --gold:#C08A2E;
  --gold-light:#D9A94A;
  --gold-dark:#8A6318;
  --teal:#1B4B5A;
  --teal-light:#2C6E82;
  --ink:#3D3229;
  --ink-soft:#5B5044;
  --ink-muted:#6B5F4F;
  --line:#E8E2D4;
  --line-soft:#F0ECE2;
  --white:#FFFFFF;

  --shadow-card: 0 1px 2px rgba(15,31,61,0.06);
  --shadow-hover: 0 12px 28px rgba(15,31,61,0.14);
  --focus-ring: 0 0 0 3px rgba(192,138,46,0.45);
  --radius:12px;

  --wrap-max:1180px;
  --wrap-pad:32px;
  --header-h:72px;
}

/* ---------- Reset ---------- */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }

html{ scroll-behavior:smooth; }

body{
  background:#FFFFFF;
  color:var(--ink);
  font-family:'Inter', system-ui, -apple-system, sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

h1,h2,h3,h4,.brand-name{
  font-family:'Fraunces', Georgia, serif;
  color:var(--navy);
  font-weight:600;
  letter-spacing:-0.01em;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; height:auto; }
ul{ list-style:none; }

:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
  border-radius:4px;
}

/* ---------- Layout Helpers ---------- */
.wrap{
  max-width:var(--wrap-max);
  margin:0 auto;
  padding:0 var(--wrap-pad);
}

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:#FFFFFF;
  border-bottom:1px solid var(--line-soft);
}

.site-header nav.wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:var(--header-h);
  position:relative;
  gap:24px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
  text-decoration:none;
}
.brand img{
  height:38px;
  width:38px;
  object-fit:contain;
  display:block;
  flex-shrink:0;
}
.brand-name{
  font-family:'Fraunces', Georgia, serif;
  font-size:1.0625rem;
  font-weight:600;
  color:var(--navy);
  white-space:nowrap;
  line-height:1;
  letter-spacing:-0.01em;
}

.nav-links{
  display:flex;
  gap:36px;
  font-size:0.95rem;
  font-weight:500;
  color:var(--navy);
}
.nav-links a{
  position:relative;
  padding:6px 0;
  transition:color .2s ease;
}
.nav-links a::after{
  content:'';
  position:absolute;
  left:0; bottom:0;
  width:0; height:2px;
  background:var(--gold);
  transition:width .25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible{ color:var(--gold-dark); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after{ width:100%; }

.nav-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:8px;
  border-radius:6px;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:var(--navy);
  margin:5px 0;
  transition:transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2){
  opacity:0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  padding:56px 0 40px;
  background:#FFFFFF;
  color:var(--ink);
  position:relative;
  overflow:hidden;
  border-bottom:1px solid var(--line-soft);
}
.hero::before{
  content:'';
  position:absolute;
  top:-50%;
  right:-20%;
  width:600px;
  height:600px;
  background:radial-gradient(circle, rgba(192,138,46,0.06) 0%, transparent 70%);
  pointer-events:none;
}
.hero-inner{
  max-width:680px;
  position:relative;
  z-index:1;
}

.eyebrow-line{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:0.92rem;
  color:var(--teal);
  font-weight:600;
  margin-bottom:18px;
}
.eyebrow-line .dot{
  width:7px; height:7px;
  border-radius:50%;
  background:var(--gold);
  display:inline-block;
}

.hero h1{
  font-size:clamp(1.9rem, 4.2vw, 2.7rem);
  line-height:1.15;
  margin-bottom:18px;
  color:var(--navy);
}

.hero p.lede{
  font-size:1.08rem;
  color:var(--ink-soft);
  margin-bottom:26px;
  max-width:560px;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  margin-top:6px;
  max-width:100%;
}
.hero-actions .btn-secondary,
.hero-actions .btn-primary{
  padding:12px 22px;
  font-size:0.93rem;
  white-space:nowrap;
  flex:0 0 auto;
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:14px 26px;
  border-radius:6px;
  font-weight:600;
  font-size:0.98rem;
  transition:all .22s ease;
  cursor:pointer;
  font-family:inherit;
}
.btn-primary{
  background:var(--gold);
  color:var(--navy);
  border:1.5px solid var(--gold);
}
.btn-primary:hover,
.btn-primary:focus-visible{
  background:var(--gold-light);
  border-color:var(--gold-light);
  transform:translateY(-2px);
  box-shadow:0 10px 20px rgba(192,138,46,0.28);
}
.btn-secondary{
  background:transparent;
  color:var(--navy);
  border:1.5px solid var(--navy);
}
.btn-secondary:hover,
.btn-secondary:focus-visible{
  background:var(--navy);
  color:var(--white);
}

/* =========================================================
   LATEST POSTS (Horizontal scroll)
   ========================================================= */
.latest-band{
  background:#FFFFFF;
  border-bottom:1px solid var(--line-soft);
  padding:32px 0 36px;
}

.latest-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  gap:16px;
  flex-wrap:wrap;
}
.latest-head h2{ font-size:1.4rem; }
.latest-head .view-all{
  font-weight:600;
  font-size:0.9rem;
  color:var(--navy);
  display:flex;
  align-items:center;
  gap:6px;
  border-bottom:2px solid transparent;
  padding-bottom:4px;
  transition:border-color .2s ease;
}
.latest-head .view-all:hover{ border-color:var(--gold); }

.scroll-row{
  display:flex;
  gap:20px;
  overflow-x:auto;
  padding:8px 4px 14px;
  scroll-snap-type:x proximity;
  scrollbar-width:thin;
  scrollbar-color:var(--line) transparent;
}
.scroll-row::-webkit-scrollbar{ height:6px; }
.scroll-row::-webkit-scrollbar-thumb{ background:var(--line); border-radius:10px; }

.post-card{
  flex:0 0 clamp(220px, 30vw, 280px);
  scroll-snap-align:start;
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  opacity:0;
  transform:translateY(16px);
  animation:cardIn .5s ease forwards;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display:flex;
  flex-direction:column;
}
.post-card:hover,
.post-card:focus-visible{
  transform:translateY(-5px);
  box-shadow:var(--shadow-hover);
  border-color:var(--gold);
}
.post-card:nth-child(1){ animation-delay:.05s; }
.post-card:nth-child(2){ animation-delay:.12s; }
.post-card:nth-child(3){ animation-delay:.19s; }
.post-card:nth-child(4){ animation-delay:.26s; }
.post-card:nth-child(5){ animation-delay:.33s; }

@keyframes cardIn{
  to{ opacity:1; transform:translateY(0); }
}

.post-thumb{
  height:140px;
  background:var(--navy-light);
  background-size:cover;
  background-position:center;
}
.post-body{ padding:14px 16px 16px; flex:1; }
.post-date{ font-size:0.76rem; color:var(--ink-muted); margin-bottom:6px; }
.post-card h3{
  font-size:0.96rem;
  line-height:1.35;
  font-weight:600;
  color:var(--navy);
  display:-webkit-box;
  -webkit-line-clamp:5;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Skeleton for scroll row */
.skeleton{
  flex:0 0 clamp(220px, 30vw, 280px);
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
}
.skeleton-thumb{
  height:140px;
  background:linear-gradient(90deg, #EEE9DD 25%, #F7F5F0 50%, #EEE9DD 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
}
.skeleton-body{ padding:16px 18px 18px; }
.skeleton-line{
  height:12px;
  border-radius:6px;
  background:linear-gradient(90deg, #EEE9DD 25%, #F7F5F0 50%, #EEE9DD 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
  margin-bottom:10px;
}
.skeleton-line.short{ width:40%; }
.skeleton-line.med{ width:75%; }

@keyframes shimmer{
  0%{ background-position:200% 0; }
  100%{ background-position:-200% 0; }
}

.latest-state{
  font-size:0.92rem;
  color:var(--ink-muted);
  padding:20px 0;
}

/* =========================================================
   NEWS GRID (Campus / Rankings News / Students)
   ========================================================= */
.news-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
}

.news-card{
  display:flex;
  flex-direction:column;
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  height:100%;
}
.news-card:hover,
.news-card:focus-visible{
  transform:translateY(-5px);
  box-shadow:var(--shadow-hover);
  border-color:var(--gold);
}

.news-thumb{
  width:100%;
  aspect-ratio:16/9;
  background:var(--navy-light);
  background-size:cover;
  background-position:center;
  flex-shrink:0;
}

.news-body{
  padding:16px 18px 18px;
  display:flex;
  flex-direction:column;
  flex:1;
}

.news-card h3{
  font-size:1rem;
  line-height:1.35;
  font-weight:600;
  color:var(--navy);
  margin-bottom:8px;
  display:-webkit-box;
  -webkit-line-clamp:5;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.news-card p{
  font-size:0.85rem;
  line-height:1.5;
  color:var(--ink-muted);
  display:-webkit-box;
  -webkit-line-clamp:5;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin:0;
}

.news-empty{
  grid-column:1 / -1;
  text-align:center;
  padding:40px 20px;
  color:var(--ink-muted);
  font-size:0.92rem;
}

/* Skeleton for news cards */
.skeleton-card{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  height:280px;
  position:relative;
}
.skeleton-card::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, #F0ECE2 25%, #F7F5F0 50%, #F0ECE2 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
}

/* =========================================================
   SECTIONS
   ========================================================= */
section.block{
  padding:52px 0;
  background:#FFFFFF;
}
section.block.alt{
  background:#FFFFFF;
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
}

.block-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:28px;
  gap:24px;
}
.block-head h2{
  font-size:clamp(1.5rem, 3vw, 2rem);
  max-width:480px;
}
.block-tag{
  display:inline-block;
  font-size:0.82rem;
  font-weight:600;
  padding:5px 12px;
  border-radius:20px;
  margin-bottom:12px;
}
.tag-gold{ background:#F3E7D0; color:var(--gold-dark); }
.tag-teal{ background:#DCEAEE; color:var(--teal); }
.tag-navy{ background:#DFE5EE; color:var(--navy); }

.view-all{
  font-weight:600;
  font-size:0.95rem;
  color:var(--navy);
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:6px;
  padding-bottom:6px;
  border-bottom:2px solid transparent;
  transition:border-color .2s ease;
}
.view-all:hover{ border-color:var(--gold); }

/* Reveal on scroll */
.reveal{
  opacity:0;
  transform:translateY(22px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.in{ opacity:1; transform:translateY(0); }

/* =========================================================
   RANKINGS
   ========================================================= */
.rankings-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:24px;
}
.ranking-card{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 22px;
  box-shadow:var(--shadow-card);
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.ranking-card:hover,
.ranking-card:focus-visible{
  transform:translateY(-6px);
  box-shadow:var(--shadow-hover);
  border-color:var(--gold);
}
.ranking-card .rk-badge{
  width:40px; height:40px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:0.9rem;
  color:var(--white);
  margin-bottom:16px;
}
.rk-badge.shanghai{ background:#8B2E2E; }
.rk-badge.the{ background:#5B2C87; }
.rk-badge.qs{
  background:#E0B72E;
  color:#0F1F3D;
}
.rk-badge.eduranks{ background:#1E3A8A; }
.rk-badge.universityranks{ background:#6B1F2E; }

.ranking-card h3{ font-size:1.2rem; margin-bottom:8px; }
.ranking-card .rk-desc{ font-size:0.88rem; color:var(--ink-muted); }

/* =========================================================
   GUIDES
   ========================================================= */
.guides-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:22px;
}
.guide-card{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 20px;
  transition:transform .28s ease, background .28s ease, border-color .28s ease;
}
.guide-card:hover{
  transform:translateY(-6px);
  border-color:var(--gold);
  box-shadow:var(--shadow-hover);
}
.guide-icon{
  width:46px; height:46px;
  border-radius:10px;
  background:var(--navy);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
}
.guide-icon svg{ width:22px; height:22px; stroke:var(--gold); }
.guide-card h3{ font-size:1.02rem; margin-bottom:8px; }
.guide-card p{ font-size:0.86rem; color:var(--ink-muted); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background:#0B1730;
  color:#B4C0D6;
  padding:48px 0 24px;
  font-size:0.9rem;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr 1fr;
  gap:32px;
  margin-bottom:32px;
}
.footer-grid h4{
  color:var(--white);
  font-size:0.92rem;
  margin-bottom:16px;
  font-weight:600;
  font-family:'Inter', sans-serif;
}
.footer-grid li{ margin-bottom:10px; }
.footer-grid a{ transition:color .2s ease; }
.footer-grid a:hover,
.footer-grid a:focus-visible{ color:var(--gold-light); }

.footer-brand img{ height:34px; margin-bottom:14px; }
.footer-brand p{
  max-width:280px;
  color:#9FB0CC;
  line-height:1.6;
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.08);
  padding-top:24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:6px;
  color:#8A9AB5;
  font-size:0.82rem;
}
.footer-bottom p{ margin:0; }
.footer-domain{ color:#6E7E9A; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px){
  .rankings-grid{ grid-template-columns:1fr 1fr; }
  .guides-grid{ grid-template-columns:1fr 1fr; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .news-grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width: 780px){
  :root{ --wrap-pad:24px; }

  .nav-toggle{ display:block; }

  .nav-links{
    display:none;
    position:absolute;
    top:var(--header-h);
    left:0;
    right:0;
    background:#FFFFFF;
    border-bottom:1px solid var(--line);
    flex-direction:column;
    padding:16px var(--wrap-pad) 24px;
    gap:18px;
    box-shadow:0 12px 24px rgba(15,31,61,0.08);
  }
  .nav-links.open{ display:flex; }
}

@media (max-width: 680px){
  :root{ --wrap-pad:20px; }

  .hero{ padding:40px 0 32px; }
  section.block{ padding:40px 0; }
  .latest-band{ padding:28px 0 32px; }
  .rankings-grid,
  .guides-grid{ grid-template-columns:1fr; }
  .news-grid{ grid-template-columns:1fr; }
  .block-head{ flex-direction:column; align-items:flex-start; margin-bottom:22px; }
  .footer-grid{ grid-template-columns:1fr; }

  .hero-actions{ gap:10px; width:100%; }
  .hero-actions .btn-secondary,
  .hero-actions .btn-primary{
    padding:11px 18px;
    font-size:0.88rem;
    flex:1 1 calc(50% - 5px);
    justify-content:center;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:0.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.001ms !important;
    scroll-behavior:auto !important;
  }
  .reveal{ opacity:1; transform:none; }
  .post-card{ opacity:1; transform:none; }
}


/* =========================================================
   PAGE HERO (inner pages)
   ========================================================= */
.page-hero{
  padding:48px 0 36px;
  background:#FFFFFF;
  border-bottom:1px solid var(--line-soft);
}
.page-hero h1{
  font-size:clamp(1.8rem, 4vw, 2.6rem);
  line-height:1.15;
  margin-bottom:18px;
  color:var(--navy);
  max-width:720px;
}
.page-hero .lede{
  font-size:1.08rem;
  color:var(--ink-soft);
  max-width:640px;
}

.breadcrumb{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:0.85rem;
  color:var(--ink-muted);
  margin-bottom:20px;
}
.breadcrumb a{
  color:var(--ink-muted);
  transition:color .2s ease;
}
.breadcrumb a:hover{ color:var(--gold-dark); }
.breadcrumb span[aria-current]{ color:var(--navy); font-weight:500; }

/* =========================================================
   ABOUT GRID
   ========================================================= */
.about-grid{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:48px;
  align-items:start;
}
.about-content h2{
  font-size:clamp(1.5rem, 3vw, 2rem);
  margin-bottom:20px;
  max-width:520px;
}
.about-content p{
  font-size:1rem;
  line-height:1.75;
  color:var(--ink-soft);
  margin-bottom:18px;
  max-width:640px;
}
.about-content p:last-child{ margin-bottom:0; }

.about-aside{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 22px;
  box-shadow:var(--shadow-card);
}
.about-aside h3{
  font-size:1.05rem;
  margin-bottom:16px;
  color:var(--navy);
}
.about-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.about-list li{
  padding-bottom:14px;
  border-bottom:1px solid var(--line-soft);
}
.about-list li:last-child{
  padding-bottom:0;
  border-bottom:none;
}
.about-list strong{
  display:block;
  font-size:0.92rem;
  color:var(--navy);
  margin-bottom:4px;
  font-weight:600;
}
.about-list span{
  display:block;
  font-size:0.84rem;
  color:var(--ink-muted);
  line-height:1.5;
}

/* =========================================================
   VALUES GRID
   ========================================================= */
.values-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:22px;
}
.value-card{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 20px;
  transition:transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.value-card:hover{
  transform:translateY(-6px);
  border-color:var(--gold);
  box-shadow:var(--shadow-hover);
}
.value-icon{
  width:46px; height:46px;
  border-radius:10px;
  background:var(--navy);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
}
.value-icon svg{ width:22px; height:22px; stroke:var(--gold); }
.value-card h3{
  font-size:1.02rem;
  margin-bottom:8px;
  color:var(--navy);
}
.value-card p{
  font-size:0.86rem;
  color:var(--ink-muted);
  line-height:1.55;
}

/* =========================================================
   CTA BOX
   ========================================================= */
.cta-box{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:32px;
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:32px 36px;
  box-shadow:var(--shadow-card);
}
.cta-box h2{
  font-size:clamp(1.3rem, 2.5vw, 1.6rem);
  margin-bottom:8px;
  color:var(--navy);
}
.cta-box p{
  font-size:0.96rem;
  color:var(--ink-muted);
  max-width:520px;
}
.cta-actions{
  display:flex;
  gap:12px;
  flex-shrink:0;
  flex-wrap:wrap;
}

@media (max-width: 980px){
  .about-grid{ grid-template-columns:1fr; gap:32px; }
  .values-grid{ grid-template-columns:1fr 1fr; }
  .cta-box{
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
  }
}
@media (max-width: 680px){
  .page-hero{ padding:40px 0 32px; }
  .values-grid{ grid-template-columns:1fr; }
  .cta-box{ padding:24px 20px; }
  .cta-actions{ width:100%; }
  .cta-actions .btn-primary,
  .cta-actions .btn-secondary{
    flex:1 1 auto;
    justify-content:center;
  }
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1.4fr;
  gap:48px;
  align-items:start;
}

.contact-info h2{
  font-size:1.4rem;
  margin-bottom:24px;
  color:var(--navy);
}

.contact-list{
  display:flex;
  flex-direction:column;
  gap:20px;
  margin-bottom:28px;
}
.contact-list li{
  display:flex;
  gap:16px;
  align-items:flex-start;
}
.contact-icon{
  width:42px;
  height:42px;
  border-radius:10px;
  background:var(--navy);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.contact-icon svg{
  width:20px;
  height:20px;
  stroke:var(--gold);
}
.contact-list strong{
  display:block;
  font-size:0.88rem;
  color:var(--navy);
  font-weight:600;
  margin-bottom:4px;
}
.contact-list a{
  font-size:0.92rem;
  color:var(--ink-muted);
  transition:color .2s ease;
  word-break:break-all;
}
.contact-list a:hover{ color:var(--gold-dark); }

.contact-social{
  padding-top:24px;
  border-top:1px solid var(--line-soft);
}
.contact-social h3{
  font-size:1rem;
  margin-bottom:14px;
  color:var(--navy);
}
.social-links{
  display:flex;
  gap:10px;
}
.social-links a{
  width:42px;
  height:42px;
  border-radius:10px;
  background:#FFFFFF;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--navy);
  transition:all .25s ease;
}
.social-links a:hover{
  background:var(--navy);
  color:#FFFFFF;
  border-color:var(--navy);
  transform:translateY(-2px);
}
.social-links svg{
  width:20px;
  height:20px;
}

.contact-form-wrap{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:32px 30px;
  box-shadow:var(--shadow-card);
}

.contact-form{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.form-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-field label{
  font-size:0.86rem;
  font-weight:600;
  color:var(--navy);
}
.form-field label span[aria-hidden]{
  color:var(--gold);
  font-weight:700;
}

.form-field input,
.form-field select,
.form-field textarea{
  width:100%;
  padding:12px 14px;
  font-family:inherit;
  font-size:0.95rem;
  color:var(--ink);
  background:#FFFFFF;
  border:1.5px solid var(--line);
  border-radius:8px;
  transition:border-color .2s ease, box-shadow .2s ease;
  outline:none;
}
.form-field input::placeholder,
.form-field textarea::placeholder{
  color:#B0A694;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(192,138,46,0.15);
}
.form-field textarea{
  resize:vertical;
  min-height:130px;
  line-height:1.6;
}
.form-field select{
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F1F3D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:18px;
  padding-right:44px;
}

.form-actions{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  margin-top:6px;
}
.form-note{
  font-size:0.82rem;
  color:var(--ink-muted);
  margin:0;
}

@media (max-width: 980px){
  .contact-grid{
    grid-template-columns:1fr;
    gap:32px;
  }
  .form-row{
    grid-template-columns:1fr;
  }
}
@media (max-width: 680px){
  .contact-form-wrap{
    padding:24px 20px;
  }
  .form-actions{
    flex-direction:column;
    align-items:stretch;
  }
  .form-actions .btn-primary{
    justify-content:center;
  }
  .form-note{
    text-align:center;
  }
}

/* =========================================================
   RANKINGS PAGE
   ========================================================= */
.rankings-intro{
  max-width:780px;
  margin:0 auto;
  text-align:center;
}
.rankings-intro h2{
  font-size:clamp(1.5rem, 3vw, 2rem);
  margin-bottom:20px;
  color:var(--navy);
}
.rankings-intro p{
  font-size:1rem;
  line-height:1.75;
  color:var(--ink-soft);
  margin-bottom:16px;
}

.ranking-section{ padding:52px 0; }

.ranking-header{
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:28px;
}
.ranking-badge{
  width:64px;
  height:64px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:1.15rem;
  color:#FFFFFF;
  flex-shrink:0;
}
.ranking-badge.shanghai{ background:#8B2E2E; }
.ranking-badge.the{ background:#5B2C87; }
.ranking-badge.qs{ background:#E0B72E; color:#0F1F3D; }
.ranking-badge.eduranks{ background:#1E3A8A; }
.ranking-badge.universityranks{ background:#6B1F2E; }

.ranking-header h2{
  font-size:clamp(1.4rem, 2.8vw, 1.9rem);
  color:var(--navy);
  margin:0;
}
.ranking-header .block-tag{
  margin-bottom:8px;
}

.ranking-detail{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:40px;
  align-items:start;
  margin-bottom:32px;
}
.ranking-summary .ranking-lead{
  font-size:1.05rem;
  line-height:1.6;
  color:var(--navy);
  font-weight:500;
  margin-bottom:16px;
}
.ranking-summary p{
  font-size:0.96rem;
  line-height:1.75;
  color:var(--ink-soft);
  margin-bottom:14px;
}
.ranking-summary strong{
  color:var(--navy);
  font-weight:600;
}

.ranking-facts{
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px 20px;
  box-shadow:var(--shadow-card);
}
.ranking-facts dl{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0;
}
.ranking-facts dl > div{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding-bottom:12px;
  border-bottom:1px solid var(--line-soft);
}
.ranking-facts dl > div:last-child{
  padding-bottom:0;
  border-bottom:none;
}
.ranking-facts dt{
  font-size:0.72rem;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--ink-muted);
  font-weight:600;
}
.ranking-facts dd{
  font-size:0.92rem;
  color:var(--navy);
  font-weight:500;
  margin:0;
}

.criteria-grid{
  margin-top:6px;
}
.criteria-title{
  font-size:1.1rem;
  color:var(--navy);
  margin-bottom:18px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line-soft);
}
.criteria-items{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}
.criteria-item{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:16px 18px;
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:10px;
  transition:border-color .25s ease, transform .25s ease;
}
.criteria-item:hover{
  border-color:var(--gold);
  transform:translateY(-2px);
}
.criteria-weight{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:56px;
  height:36px;
  padding:0 10px;
  background:var(--navy);
  color:var(--gold);
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:0.88rem;
  border-radius:8px;
  flex-shrink:0;
}
.criteria-item strong{
  display:block;
  font-size:0.94rem;
  color:var(--navy);
  font-weight:600;
  margin-bottom:4px;
}
.criteria-item p{
  font-size:0.84rem;
  line-height:1.5;
  color:var(--ink-muted);
  margin:0;
}

.compare-table-wrap{
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#FFFFFF;
  box-shadow:var(--shadow-card);
}
.compare-table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}
.compare-table thead th{
  background:var(--navy);
  color:#FFFFFF;
  font-size:0.82rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.04em;
  padding:16px 18px;
  text-align:left;
  white-space:nowrap;
}
.compare-table tbody td{
  padding:16px 18px;
  font-size:0.9rem;
  color:var(--ink-soft);
  border-bottom:1px solid var(--line-soft);
  vertical-align:top;
}
.compare-table tbody tr:last-child td{
  border-bottom:none;
}
.compare-table tbody tr:hover{
  background:#FAF8F3;
}
.compare-table tbody td strong{
  color:var(--navy);
  font-weight:600;
}

.advice-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:22px;
}
.advice-card{
  position:relative;
  background:#FFFFFF;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 22px 22px;
  transition:transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.advice-card:hover{
  transform:translateY(-6px);
  border-color:var(--gold);
  box-shadow:var(--shadow-hover);
}
.advice-number{
  width:38px;
  height:38px;
  border-radius:10px;
  background:var(--navy);
  color:var(--gold);
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
}
.advice-card h3{
  font-size:1.02rem;
  color:var(--navy);
  margin-bottom:10px;
}
.advice-card p{
  font-size:0.88rem;
  line-height:1.6;
  color:var(--ink-muted);
  margin:0;
}

@media (max-width: 980px){
  .ranking-detail{
    grid-template-columns:1fr;
    gap:24px;
  }
  .advice-grid{
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width: 680px){
  .ranking-section{ padding:40px 0; }
  .ranking-header{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
  }
  .advice-grid{
    grid-template-columns:1fr;
  }
  .criteria-items{
    grid-template-columns:1fr;
  }
  .ranking-facts{
    padding:18px 16px;
  }
}

/* =========================================================
   RANKING CTA (external link button)
   ========================================================= */
.ranking-cta{
  margin-top:28px;
  padding-top:22px;
  border-top:1px solid var(--line-soft);
}

.link-external{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:0.92rem;
  font-weight:600;
  color:var(--navy);
  padding:12px 22px;
  border:1.5px solid var(--navy);
  border-radius:8px;
  background:transparent;
  transition:all .22s ease;
  text-decoration:none;
}
.link-external:hover,
.link-external:focus-visible{
  background:var(--navy);
  color:#FFFFFF;
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(15,31,61,0.15);
}
.link-external svg{
  width:16px;
  height:16px;
  stroke:currentColor;
  transition:transform .22s ease;
  flex-shrink:0;
}
.link-external:hover svg{
  transform:translate(3px, -3px);
}