/* ==========================================================================
   Pitt Research Studies — styles (public site + admin)
   Brand: Pitt Royal #003594 · Pitt Gold #FFB81C
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-800-normal.woff2") format("woff2"); }

:root {
  --pitt-blue: #003594;
  --pitt-blue-dark: #00205B;
  --pitt-navy: #1C2957;
  --pitt-gold: #FFB81C;
  --pitt-gold-dark: #E5A000;
  --pitt-gold-soft: #FFF4D6;
  --ink: #16203A;
  --muted: #5B6478;
  --line: #E3E7F0;
  --bg: #F4F6FB;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 32, 72, .06), 0 8px 24px rgba(16, 32, 72, .06);

  --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-link-color: var(--pitt-blue);
  --bs-link-color-rgb: 0, 53, 148;
  --bs-link-hover-color: var(--pitt-blue-dark);
  --bs-primary: var(--pitt-blue);
  --bs-primary-rgb: 0, 53, 148;
  --bs-border-radius: .65rem;
}

body { -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 999px; padding: .6rem 1.25rem; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: .35rem .9rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn-pitt { --bs-btn-color: #fff; --bs-btn-bg: var(--pitt-blue); --bs-btn-border-color: var(--pitt-blue);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--pitt-blue-dark); --bs-btn-hover-border-color: var(--pitt-blue-dark);
  --bs-btn-active-bg: var(--pitt-blue-dark); --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--pitt-blue); --bs-btn-disabled-border-color: var(--pitt-blue); }
.btn-gold { --bs-btn-color: var(--pitt-navy); --bs-btn-bg: var(--pitt-gold); --bs-btn-border-color: var(--pitt-gold);
  --bs-btn-hover-color: var(--pitt-navy); --bs-btn-hover-bg: #FFC845; --bs-btn-hover-border-color: #FFC845;
  --bs-btn-active-bg: var(--pitt-gold-dark); --bs-btn-active-color: var(--pitt-navy); box-shadow: 0 6px 18px rgba(255, 184, 28, .35); }
.btn-outline-pitt { --bs-btn-color: var(--pitt-blue); --bs-btn-border-color: #C7D1EA; --bs-btn-bg: #fff;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--pitt-blue); --bs-btn-hover-border-color: var(--pitt-blue);
  --bs-btn-active-bg: var(--pitt-blue-dark); --bs-btn-active-color: #fff; }
.btn-header { color: #fff; border: 1px solid rgba(255,255,255,.35); align-items: center; gap: .4rem; }
.btn-header:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--pitt-blue); color: #fff; border-bottom: 4px solid var(--pitt-gold); }
.site-header .container { min-height: 72px; }
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand img { height: 45px; width: auto; }
.brand-divider { width: 1px; height: 34px; background: rgba(255,255,255,.4); }
.brand-text { font-weight: 600; font-size: .82rem; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; }
.admin-strip { background: var(--pitt-gold-soft); color: var(--pitt-navy); font-size: .85rem; padding: .45rem 0; }
.admin-strip a { font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; padding: 3rem 0 6.5rem;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(255,184,28,.18), transparent 60%),
              linear-gradient(160deg, var(--pitt-blue) 0%, #0B2A7A 55%, var(--pitt-navy) 100%); overflow: hidden; }
.hero-kicker { display: inline-flex; gap: .4rem; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .03em; color: var(--pitt-gold); }
.hero-title { font-weight: 800; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.12; margin: 1rem 0 .75rem; max-width: 18ch; }
.hero-text { font-size: clamp(.98rem, 2.2vw, 1.12rem); opacity: .9; max-width: 56ch; margin-bottom: 1.5rem; }
.hero-search { display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 999px; padding: .35rem .35rem .35rem 1.1rem;
  max-width: 620px; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.hero-search > i { color: var(--muted); }
.hero-search input { flex: 1; border: 0; outline: 0; min-width: 0; font-size: 1rem; color: var(--ink); background: transparent; padding: .5rem 0; }
.hero-search .btn { padding: .55rem 1.2rem; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; }
.hero-wave svg { width: 100%; height: 100%; display: block; }

/* ---------- Category "stories" strip ---------- */
.category-strip { display: flex; gap: 1rem; overflow-x: auto; padding: .25rem .25rem 1rem; margin: -2.5rem -.25rem 1rem; position: relative; z-index: 2;
  scrollbar-width: none; scroll-snap-type: x proximity; }
.category-strip::-webkit-scrollbar { display: none; }
.cat-pill { display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 76px; max-width: 92px; color: var(--ink);
  font-size: .75rem; font-weight: 500; text-align: center; line-height: 1.2; scroll-snap-align: start; }
.cat-pill:hover { text-decoration: none; color: var(--pitt-blue); }
.cat-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.35rem; color: var(--pitt-blue);
  background: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #C7D1EA, var(--shadow); transition: transform .15s; }
.cat-pill.active .cat-ring { background: var(--pitt-blue); color: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pitt-gold), var(--shadow); }
.cat-pill.active { font-weight: 700; color: var(--pitt-blue); }
.cat-pill:hover .cat-ring { transform: translateY(-2px); }

/* ---------- Section titles / misc ---------- */
.section-title { font-weight: 700; font-size: 1.35rem; color: var(--pitt-navy); display: flex; align-items: center; gap: .5rem; }
.count-pill { background: var(--pitt-gold); color: var(--pitt-navy); font-size: .8rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; }
.empty-state { background: #fff; border: 1px dashed #C7D1EA; border-radius: var(--radius); padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.empty-state > i { font-size: 2.5rem; color: var(--pitt-blue); display: block; margin-bottom: .75rem; }
.empty-state h3, .empty-state h1 { color: var(--ink); font-weight: 700; font-size: 1.25rem; }

/* ---------- Feed (Instagram-like) ---------- */
.feed { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feed { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .feed { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639.98px) { .feed { max-width: 520px; margin: 0 auto; } }

.study-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease; }
.study-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,32,72,.06), 0 16px 36px rgba(16,32,72,.12); }
.study-card-head { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; font-size: .9rem; }
.avatar { border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--pitt-gold); }
.study-card-media { display: block; aspect-ratio: 4 / 5; background: #E9EDF6; overflow: hidden; }
.study-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.study-card:hover .study-card-media img { transform: scale(1.03); }
.study-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.study-card-title { font-size: 1.08rem; font-weight: 700; line-height: 1.3; margin: .15rem 0 0; }
.study-card-title a { color: var(--ink); }
.study-card-title a:hover { color: var(--pitt-blue); text-decoration: none; }
.study-card-summary { color: var(--muted); font-size: .92rem; margin: 0 0 .5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.study-card-body .btn { margin-top: auto; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px;
  background: #EEF2FB; color: var(--pitt-blue); white-space: nowrap; }
.chip-gold { background: var(--pitt-gold); color: var(--pitt-navy); }
.chip-gold-soft { background: var(--pitt-gold-soft); color: #8A5A00; }

/* ---------- Study detail ---------- */
.back-link { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
.alert-paused { display: flex; gap: .75rem; align-items: flex-start; background: var(--pitt-gold-soft); border: 1px solid #FFD77A; color: #5C3D00; border-radius: 14px; }
.alert-paused > i { font-size: 1.4rem; color: var(--pitt-gold-dark); }
.study-media-sticky { position: sticky; top: 1.25rem; }
.study-media { display: block; position: relative; width: 100%; padding: 0; border: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; }
.study-media img { width: 100%; display: block; }
.zoom-hint { position: absolute; right: .75rem; bottom: .75rem; background: rgba(0,32,91,.8); color: #fff; font-size: .75rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; }
.eyebrow { color: var(--pitt-blue); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: .35rem; }
.study-title { font-weight: 800; color: var(--pitt-navy); font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; margin-bottom: .75rem; }
.study-lead { font-size: 1.08rem; color: #3A4560; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin: 1.25rem 0 1.5rem; }
.glance-item { display: flex; gap: .75rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; }
.glance-item > i { font-size: 1.3rem; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--pitt-gold-soft); color: #A06A00; flex-shrink: 0; }
.glance-item span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.glance-item strong { display: block; font-size: .95rem; line-height: 1.3; color: var(--ink); }

.info-block { background: #fff; border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-bottom: 1rem; border: 1px solid var(--line); border-left: 5px solid var(--pitt-gold); }
.info-block h2 { font-size: 1.1rem; font-weight: 700; color: var(--pitt-navy); display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.info-block h2 i { color: var(--pitt-blue); }
.info-block p:last-child { margin-bottom: 0; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list > li { position: relative; padding: .35rem 0 .35rem 2rem; font-weight: 500; }
.check-list > li::before { content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .3rem; color: var(--pitt-blue); font-size: 1.15rem; }
.check-list ul { margin: .35rem 0 0; padding-left: 1.1rem; font-weight: 400; color: var(--muted); font-size: .93rem; font-style: italic; }

.cta-block { background: linear-gradient(150deg, var(--pitt-blue), var(--pitt-navy)); color: #fff; border-radius: var(--radius); padding: 1.6rem 1.5rem; margin: 1.5rem 0 1rem; position: relative; overflow: hidden; }
.cta-block::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 22px solid rgba(255,184,28,.18); }
.cta-block h2 { font-weight: 800; font-size: 1.35rem; }
.cta-block p { opacity: .92; }
.contact-block .btn { font-size: .9rem; }
.more-studies { background: #EAEEF7; }

.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.sticky-cta .btn { padding: .8rem; }
@media (max-width: 991.98px) { body:has(.sticky-cta) .site-footer { padding-bottom: 80px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--pitt-navy); color: #fff; position: relative; margin-top: 0; }
.footer-wave { height: 6px; background: linear-gradient(90deg, var(--pitt-gold), #FFD368, var(--pitt-gold)); }
.site-footer a { color: var(--pitt-gold); }
.footer-note { opacity: .85; font-size: .92rem; }
.footer-staff { color: rgba(255,255,255,.75) !important; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: var(--bg); }
.admin-nav { background: var(--pitt-blue); border-bottom: 4px solid var(--pitt-gold); }
.admin-nav .navbar-brand img { height: 36px; }
.admin-nav .nav-link { white-space: nowrap; color: rgba(255,255,255,.85); font-weight: 500; border-radius: 999px; padding: .4rem .9rem !important; }
.admin-nav .nav-link:hover, .admin-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.14); text-decoration: none; }
.admin-nav .navbar-toggler { border-color: rgba(255,255,255,.4); }
.admin-nav .navbar-toggler-icon { filter: invert(1); }
.admin-title { font-weight: 700; color: var(--pitt-navy); }
.card { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stat-card { padding: 1.1rem 1.25rem; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--pitt-navy); line-height: 1; }
.stat-card .stat-label { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-card i { font-size: 1.5rem; }
.status-badge { font-weight: 600; font-size: .75rem; padding: .35em .7em; border-radius: 999px; }
.text-bg-warning.status-badge { background: var(--pitt-gold) !important; color: var(--pitt-navy) !important; }
.table-studies td { vertical-align: middle; }
.table-studies .thumb { width: 52px; height: 65px; object-fit: cover; object-position: top; border-radius: 8px; background: #E9EDF6; }
.table-studies .thumb-empty { width: 52px; height: 65px; border-radius: 8px; background: #E9EDF6; display: grid; place-items: center; color: #9AA5BD; }
.nav-pills .nav-link { border-radius: 999px; font-weight: 600; color: var(--muted); }
.nav-pills .nav-link.active { background: var(--pitt-blue); }
.form-label { font-weight: 600; font-size: .9rem; }
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #6C8BD4; box-shadow: 0 0 0 .2rem rgba(0,53,148,.15); }
.form-section-title { font-weight: 700; color: var(--pitt-navy); font-size: 1rem; display: flex; gap: .5rem; align-items: center; }
.form-section-title i { color: var(--pitt-blue); }
.status-option { border: 2px solid var(--line); border-radius: 12px; padding: .7rem .9rem; cursor: pointer; display: flex; gap: .6rem; align-items: flex-start; transition: border-color .15s; }
.status-option:has(input:checked) { border-color: var(--pitt-blue); background: #F2F5FC; }
.status-option input { margin-top: .3rem; }
.preview-wrap { position: sticky; top: 1rem; }
.preview-wrap .study-card { max-width: 360px; margin: 0 auto; pointer-events: none; }
.image-drop { border: 2px dashed #C7D1EA; border-radius: 14px; padding: 1rem; text-align: center; background: #FAFBFE; }
.qr-box { background: #fff; padding: 12px; border-radius: 12px; border: 1px solid var(--line); display: inline-block; }
.qr-box canvas, .qr-box img { display: block; }
.login-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 2rem 1rem; }
.login-card { width: 100%; max-width: 420px; }
