/* Ramaiah School of Public Health — site styles
   Palette follows the MSRUAS school microsites (royal purple header, orange-red
   accent buttons) with the RSPH navy/crimson from the logo. */
:root {
  --purple: #361C6A;        /* MSRUAS header purple */
  --purple-dark: #24104D;
  --orange: #E34A21;        /* MSRUAS accent outline / CTA */
  --crimson: #A82042;       /* RSPH crimson */
  --crimson-dark: #821531;
  --navy: #021152;          /* RSPH navy (logo text) */
  --royal: #1E40AF;
  --footer: #020B27;
  --bg: #F7F6FB;
  --card: #FFFFFF;
  --text: #141B2B;
  --muted: #2E3546;
  --border: #E4E1EE;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(36, 16, 77, 0.08);
  --max: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15.5px;
}
img { max-width: 100%; display: block; }
a { color: var(--crimson); }
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--purple); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Announcement strip ---------- */
.notice-strip { background: var(--orange); color: #fff; font-size: 13.5px; font-weight: 600; }
.notice-strip .wrap { display: flex; align-items: center; gap: 14px; padding-top: 7px; padding-bottom: 7px; }
.notice-strip .tag { background: #fff; color: var(--orange); border-radius: 4px; padding: 1px 8px; font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; flex-shrink: 0; }
.notice-strip a { color: #fff; }

/* ---------- Header: logo bar ---------- */
.site-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 14px rgba(0,0,0,.12); }
.brand-bar { background: #fff; border-bottom: 1px solid var(--border); }
.brand-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; min-width: 0; }
.brand img { height: 62px; width: auto; }
.brand-divider { width: 1px; align-self: stretch; background: var(--border); }
.brand-uni { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; color: var(--purple); text-transform: uppercase; line-height: 1.35; }
.brand-uni span { display: block; font-weight: 500; color: var(--muted); letter-spacing: .4px; text-transform: none; font-size: 12px; }
.util { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.util a {
  border: 2px solid var(--orange); color: var(--purple); text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 7px 13px; border-radius: 4px; white-space: nowrap; transition: background .15s, color .15s;
}
.util a:hover, .util a.solid { background: var(--orange); color: #fff; }
.util a.solid:hover { background: #c63c17; border-color: #c63c17; }

/* ---------- Header: main nav row ---------- */
.nav-bar { background: var(--purple); }
.nav-bar .wrap { display: flex; align-items: center; justify-content: space-between; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.menu > li > a {
  display: flex; align-items: center; gap: 6px; color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  padding: 15px 15px; border-bottom: 3px solid transparent;
}
.menu > li > a:hover, .menu > li:focus-within > a { background: var(--purple-dark); }
.menu > li > a.active { border-bottom-color: var(--orange); background: var(--purple-dark); }
.menu .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #fff; opacity: .8; }
.dropdown {
  list-style: none; margin: 0; padding: 8px 0; position: absolute; left: 0; top: 100%;
  min-width: 320px; background: #fff; border-top: 3px solid var(--orange);
  box-shadow: 0 14px 34px rgba(0,0,0,.16); border-radius: 0 0 8px 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .16s ease;
}
.menu > li:hover .dropdown, .menu > li:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: block; padding: 9px 20px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.dropdown a:hover, .dropdown a.active { background: #F3EFFA; color: var(--purple); }
.dropdown .group { padding: 10px 20px 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--crimson); }
.dropdown .sub a { padding-left: 32px; font-size: 13.5px; }
.menu-toggle { display: none; background: none; border: 2px solid rgba(255,255,255,.6); color: #fff; border-radius: 6px; padding: 8px 12px; font: 600 13px Montserrat, sans-serif; letter-spacing: .5px; cursor: pointer; margin: 8px 0; }

/* ---------- Page hero ---------- */
.page-hero {
  background:
    linear-gradient(115deg, rgba(36,16,77,.95) 0%, rgba(54,28,106,.88) 45%, rgba(168,32,66,.82) 100%),
    var(--hero-img, none) center/cover no-repeat;
  color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border-radius: 50%; border: 60px solid rgba(255,255,255,.05);
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p.lead { font-size: 1.08rem; max-width: 760px; opacity: .92; margin: 0; }
.crumbs { font-size: 12.5px; letter-spacing: .4px; margin-bottom: 14px; opacity: .85; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.page-hero .eyebrow { color: #FFB59E; }

/* ---------- Home hero ---------- */
.home-hero {
  background:
    linear-gradient(105deg, rgba(36,16,77,.97) 0%, rgba(54,28,106,.95) 50%, rgba(130,21,49,.95) 100%),
    url('hero-pattern.svg') right center/cover no-repeat;
  color: #fff; padding: 88px 0 80px;
}
.home-hero .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.home-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.home-hero h1 em { font-style: normal; color: #FFB59E; }
.home-hero p.lead { font-size: 1.12rem; opacity: .93; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-panel { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 26px; backdrop-filter: blur(4px); }
.hero-panel h3 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; }
.hero-panel li { border-top: 1px solid rgba(255,255,255,.14); padding: 11px 0; font-size: 14px; }
.hero-panel li:first-child { border-top: 0; padding-top: 0; }
.hero-panel li a { color: #fff; text-decoration: none; font-weight: 600; }
.hero-panel li a:hover { color: #FFB59E; }
.hero-panel li small { display: block; opacity: .75; font-weight: 400; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 6px; font-weight: 700; font-size: 13.5px; letter-spacing: .5px; text-transform: uppercase; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; transition: all .15s; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #c63c17; }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--purple); }
.btn-outline { border-color: var(--purple); color: var(--purple); background: #fff; }
.btn-outline:hover { background: var(--purple); color: #fff; }

/* ---------- Sections & cards ---------- */
.section { padding: 64px 0; }
.section.alt { background: #fff; }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card.link-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s, border-color .15s; border-top: 4px solid var(--purple); }
.card.link-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(36,16,77,.14); border-top-color: var(--orange); }
.card.link-card .more { margin-top: auto; padding-top: 14px; color: var(--crimson); font-weight: 700; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; }
.card .icon { font-size: 30px; margin-bottom: 12px; line-height: 1; }
.card p { color: var(--muted); font-size: 14.5px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -42px; position: relative; z-index: 2; border: 1px solid var(--border); }
.stat { padding: 24px 22px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: Georgia, serif; font-size: 1.9rem; color: var(--crimson); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; max-height: 380px; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 3px; background: var(--crimson); box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px var(--crimson); }
.pill { display: inline-block; background: #F3EFFA; color: var(--purple); font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; margin: 0 6px 6px 0; }
.pill.hot { background: #FDECE6; color: var(--orange); }
.callout { background: linear-gradient(110deg, var(--purple) 0%, var(--crimson) 100%); color: #fff; border-radius: 16px; padding: 38px; display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.callout h2 { color: #fff; margin-bottom: .25em; }
.callout p { margin: 0; opacity: .92; }
.note { background: #FFF8E6; border: 1px dashed #E0A800; color: #6B5200; border-radius: 8px; padding: 12px 16px; font-size: 13.5px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #F3EFFA; color: var(--purple); font-size: 12.5px; letter-spacing: .6px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

/* ---------- People ---------- */
.person { display: flex; gap: 18px; align-items: flex-start; }
.avatar { width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--purple), var(--crimson)); border: 4px solid #fff; box-shadow: 0 4px 14px rgba(36,16,77,.2); }
img.avatar { object-fit: cover; padding: 0; }
.avatar.lg { width: 132px; height: 132px; font-size: 2.6rem; }
.person h3 { margin-bottom: 2px; }
.person .role { color: var(--crimson); font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.person .meta { font-size: 13.5px; color: var(--muted); }
.leader-card { display: grid; grid-template-columns: 160px 1fr; gap: 30px; align-items: start; }
.leader-card .avatar { margin: 0 auto; }

/* ---------- Side nav (sub-pages of a section) ---------- */
.with-side { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.with-side > *, .grid > *, .split > * { min-width: 0; }
.contact-item > div { min-width: 0; overflow-wrap: anywhere; }
.side-nav { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: sticky; top: 150px; }
.side-nav h4 { margin: 0; padding: 14px 18px; background: var(--purple); color: #fff; font-family: Montserrat, sans-serif; font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; }
.side-nav a { display: block; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; border-left: 3px solid transparent; }
.side-nav a:hover { background: #F7F4FC; }
.side-nav a.active { border-left-color: var(--orange); color: var(--purple); font-weight: 700; background: #F7F4FC; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { font-size: 13px; font-weight: 700; color: var(--purple); display: block; margin-bottom: 5px; }
.form input, .form select, .form textarea { width: 100%; padding: 11px 13px; border: 1px solid #CFC8DF; border-radius: 6px; font: inherit; font-size: 14.5px; background: #fff; color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
.form .hint { font-size: 12.5px; color: var(--muted); }
.form-msg { display: none; background: #ECFDF3; border: 1px solid #A6E3BE; color: #0B5D30; padding: 12px 14px; border-radius: 8px; font-size: 14px; }

/* ---------- Contact ---------- */
.contact-item { display: flex; gap: 14px; margin-bottom: 16px; }
.contact-item .ci { width: 40px; height: 40px; border-radius: 10px; background: #F3EFFA; display: grid; place-items: center; flex-shrink: 0; font-size: 18px; }
.contact-item b { display: block; color: var(--purple); font-size: 13px; letter-spacing: .4px; text-transform: uppercase; }
.contact-item a { color: var(--text); text-decoration: none; }
.contact-item a:hover { color: var(--crimson); }
.map-frame { width: 100%; height: 360px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Footer (PRISM portal pattern) ---------- */
.site-footer { background: var(--footer); color: #E2E8F0; font-size: 13.5px; line-height: 1.6; margin-top: 0; }
.footer-accent { height: 4px; background: linear-gradient(90deg, var(--crimson) 0%, var(--purple) 50%, var(--orange) 100%); }
.footer-grid { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr; gap: 36px; padding: 50px 0 36px; }
.footer-logo { height: 58px; width: auto; background: #fff; padding: 6px 14px; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.footer-brand { color: #D3DAE5; font-size: 13px; }
.footer-brand strong { color: #E2E8F0; }
.footer-h { color: #fff; font-family: Georgia, serif; font-size: 15px; font-weight: 700; margin: 0 0 16px; padding-bottom: 8px; position: relative; }
.footer-h::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--orange); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #E8EDF4; text-decoration: none; font-size: 13px; display: inline-block; transition: transform .15s, color .15s; }
.footer-links a:hover { color: #FFB59E; transform: translateX(4px); }
.footer-text { color: #D3DAE5; font-size: 12.5px; margin-bottom: 10px; }
.footer-text strong { color: #E2E8F0; }
.footer-bottom { border-top: 1px solid #1E293B; padding: 18px 0 24px; text-align: center; color: #D3DAE5; font-size: 12.5px; }
.footer-bottom strong { color: #E2E8F0; }
.footer-bottom .dim { opacity: .9; margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .menu > li > a { padding: 14px 10px; font-size: 12.5px; }
}
@media (max-width: 960px) {
  .home-hero .wrap, .split, .with-side { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .side-nav { position: static; }
  .brand-uni { display: none; }
  .brand-divider { display: none; }
  .util a:not(.solid) { display: none; }
  .menu-toggle { display: block; }
  .menu { display: none; flex-direction: column; width: 100%; padding-bottom: 10px; }
  .menu.open { display: flex; }
  .nav-bar .wrap { flex-wrap: wrap; }
  .menu > li > a { padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .menu > li > a.active { border-bottom-color: rgba(255,255,255,.1); border-left: 3px solid var(--orange); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border-top: 0; border-radius: 0; background: var(--purple-dark); padding: 4px 0; }
  .menu > li.open .dropdown { display: block; }
  .dropdown a { color: #E9E3F5; }
  .dropdown a:hover, .dropdown a.active { background: rgba(255,255,255,.08); color: #fff; }
  .dropdown .group { color: #FFB59E; }
  .leader-card { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .form .row2, .footer-grid { grid-template-columns: 1fr; }
  .brand img { height: 46px; }
  .util a.solid { padding: 6px 9px; font-size: 11px; }
  .section { padding: 46px 0; }
  .page-hero { padding: 44px 0 40px; }
  .home-hero { padding: 56px 0 72px; }
  .callout { padding: 26px; }
  .notice-strip .wrap { font-size: 12.5px; }
  .person { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Logo animation (header) ---------- */
.logo-wrap { position: relative; display: inline-block; overflow: hidden; border-radius: 6px; padding: 4px 6px; animation: logo-in .9s cubic-bezier(.2,.8,.2,1) both; }
.logo-wrap::before {
  content: ''; position: absolute; inset: 0; border-radius: 8px; padding: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--crimson) 25%, var(--orange) 50%, var(--purple) 75%, transparent 100%);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: logo-ring 6s linear infinite; opacity: .85;
}
.logo-shine { position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.75) 50%, rgba(255,255,255,0) 100%);
  animation: logo-shine 5s ease-in-out 1.2s infinite; pointer-events: none; }
.logo-wrap img { position: relative; }
@keyframes logo-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes logo-ring { from { background-position: 0% 0; } to { background-position: 300% 0; } }
@keyframes logo-shine { 0% { left: -60%; } 30%, 100% { left: 130%; } }

/* ---------- Scroll-reveal animations ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js-reveal .reveal.from-left { transform: translateX(-30px); }
.js-reveal .reveal.from-right { transform: translateX(30px); }
.js-reveal .reveal.zoom { transform: scale(.94); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.page-hero h1, .page-hero .lead, .page-hero .eyebrow, .page-hero .crumbs, .home-hero h1, .home-hero .lead, .home-hero .eyebrow, .hero-actions, .hero-panel { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.page-hero .eyebrow, .home-hero .eyebrow { animation-delay: .05s; }
.page-hero h1, .home-hero h1 { animation-delay: .15s; }
.page-hero .lead, .home-hero .lead { animation-delay: .28s; }
.hero-actions { animation-delay: .4s; }
.hero-panel { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.stat b { display: block; }

@media (prefers-reduced-motion: reduce) {
  .logo-wrap, .logo-wrap::before, .logo-shine, .page-hero *, .home-hero * { animation: none !important; }
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
