/* ==========================================================
   BGSBU – Shibboleth IdP landing page
   Palette taken from bgsbu.ac.in (teal header, white cards)
   ========================================================== */

:root {
  --teal-950: #0b2f35;
  --teal-900: #0f3f46;
  --teal-800: #17525b;
  --teal-700: #1f6370;
  --teal-600: #2a7683;
  --teal-100: #d7eaec;
  --teal-50:  #eef6f7;
  --gold:     #d9a441;
  --ink:      #1d2b30;
  --muted:    #5d6f75;
  --line:     #dbe6e8;
  --white:    #ffffff;
  --radius:   14px;
  --shadow-sm: 0 2px 8px rgba(15, 63, 70, .07);
  --shadow-md: 0 12px 32px rgba(15, 63, 70, .12);
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--teal-50);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-900); }

.wrap { width: min(1160px, 92%); margin: 0 auto; }

/* ---------- Top navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--teal-900), var(--teal-700));
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  min-width: 0;
}
.brand img {
  display: block;
  height: 52px;
  width: auto;
  padding: 4px;
  background: var(--white);
  border-radius: 10px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.brand-text small { font-size: 12px; color: rgba(255, 255, 255, .8); }
.brand-text .est { font-size: 11px; color: rgba(255, 255, 255, .68); }

.nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block;
  padding: 9px 16px;
  color: rgba(255, 255, 255, .88);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .3px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.nav a.active { background: var(--white); color: var(--teal-800); }
.nav a i { margin-right: 6px; opacity: .85; }

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  text-align: center;
  padding: 72px 0 150px;
  background-color: var(--teal-900);
  background-image:
    radial-gradient(circle at 85% 80%, rgba(217, 164, 65, .14) 0, transparent 38%),
    linear-gradient(135deg, rgba(11, 47, 53, .80) 0%, rgba(23, 82, 91, .68) 60%, rgba(42, 118, 131, .55) 100%),
    url("../images/slides/img1.jpg");
  background-size: auto, auto, cover;
  background-position: center, center, center 40%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; max-width: 860px; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--teal-100);
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
  margin: 0 0 18px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  margin: 0 auto;
  max-width: 720px;
  font-size: 17px;
  color: rgba(255, 255, 255, .86);
}

/* ---------- ONOS search card ---------- */
.finder {
  position: relative;
  z-index: 5;
  width: min(680px, 92%);
  margin: -96px auto 0;
  padding: 30px 30px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.finder h2 {
  font-family: var(--font-head);
  font-size: 24px;
  color: var(--teal-900);
  margin: 0 0 4px;
}
.finder .hint { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.finder form { display: flex; gap: 10px; }
.finder input[type=search] {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  background: var(--teal-50);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.finder input[type=search]:focus {
  outline: none;
  background: var(--white);
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(42, 118, 131, .18);
}
.finder button {
  height: 50px;
  padding: 0 28px;
  font: inherit;
  font-weight: 600;
  color: var(--white);
  background: var(--teal-700);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.finder button:hover { background: var(--teal-900); }
.finder button:active { transform: translateY(1px); }
.finder .small { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }
.finder .small a { font-weight: 600; border-bottom: 1px dashed var(--teal-600); }

/* ---------- Sections ---------- */
.section { padding: 72px 0 24px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--font-head);
  font-size: 32px;
  color: var(--teal-900);
  margin: 0;
  position: relative;
  padding-bottom: 12px;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
}
.section-head .count { color: var(--muted); font-size: 14px; margin-top: 6px; }

.filter { position: relative; width: min(340px, 100%); }
.filter i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.filter input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  font: inherit;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 10px;
}
.filter input:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(42, 118, 131, .15);
}

.intro-card {
  background: var(--white);
  border-left: 4px solid var(--teal-600);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

/* ---------- Resource grid ---------- */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.res {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.res:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-600);
}
.res > a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  flex: 1;
}
.res .mono {
  flex: 0 0 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  border-radius: 12px;
}
.res .go {
  margin-left: auto;
  color: var(--teal-600);
  opacity: 0;
  transform: translateX(-6px);
  transition: all .2s;
}
.res:hover .go { opacity: 1; transform: none; }

.res details {
  margin: 0 18px 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}
.res summary { cursor: pointer; font-weight: 600; color: var(--teal-700); }
.res details ol { margin: 8px 0 0; padding-left: 18px; }

.empty {
  display: none;
  text-align: center;
  padding: 36px;
  color: var(--muted);
}

/* ---------- Notices ---------- */
.notices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
}
.notice > i {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 17px;
}
.notice.warn > i { background: #fdf1d9; color: #a8741a; }
.notice.info > i { background: var(--teal-100); color: var(--teal-800); }
.notice strong { display: block; color: var(--teal-900); margin-bottom: 2px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 76px;
  background: var(--teal-950);
  color: rgba(255, 255, 255, .8);
  padding: 56px 0 0;
  border-top: 4px solid var(--gold);
}
.footer h3 {
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--white);
  margin: 0 0 24px;
}
.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.contact {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}
.contact h4 { margin: 0 0 10px; color: var(--white); font-size: 16px; }
.contact ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.contact li { display: flex; align-items: flex-start; gap: 10px; padding: 3px 0; word-break: break-word; }
.contact li i { margin-top: 5px; width: 16px; color: var(--gold); }
.contact a { color: rgba(255, 255, 255, .9); }
.contact a:hover { color: var(--gold); }
.copy {
  margin-top: 40px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  text-align: center;
  color: rgba(255, 255, 255, .6);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .brand-text .est { display: none; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 4%;
    background: var(--teal-900);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
  }
  .nav.open { display: flex; }
  .notices { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 130px; }
}
@media (max-width: 520px) {
  .finder form { flex-direction: column; }
  .finder button { width: 100%; }
  .brand img { height: 40px; }
  .brand-text strong { font-size: 13px; letter-spacing: .2px; }
  .brand-text small { font-size: 10.5px; }
  .brand-text .est { display: none; }
  .section { padding-top: 56px; }
}

/* ---------- E-Journals dropdown (compact) ---------- */
.acc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-800), var(--teal-600));
  border: 0;
  cursor: pointer;
  text-align: left;
}
.acc-btn:hover { background: linear-gradient(90deg, var(--teal-900), var(--teal-700)); }
.acc-btn i.fa-book { margin-right: 8px; }
.acc-btn em {
  font-style: normal;
  font-size: 13px;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
}
.acc-btn .chev { transition: transform .25s; }
.acc-btn.open .chev { transform: rotate(180deg); }
.acc-panel { padding: 18px 18px 14px; }
.acc-panel[hidden] { display: none; }
.acc-panel .filter { width: 100%; margin-bottom: 14px; display: block; }
.acc .grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}
.acc .res { box-shadow: none; border-radius: 10px; }
.acc .res:hover { transform: none; box-shadow: var(--shadow-sm); }
.acc .res > a { padding: 10px 12px; gap: 10px; font-size: 14px; }
.acc .res .mono { flex: 0 0 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.acc .res details { margin: 0 12px 10px; }

/* ---------- Notice ticker (top strip) ---------- */
.ticker {
  background: var(--teal-950);
  color: rgba(255, 255, 255, .92);
  font-family: 'Lato', 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: .2px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ticker marquee { display: block; }
.ticker i { color: var(--gold); margin: 0 6px 0 2px; font-style: normal; }
.ticker .sep { color: var(--gold); margin: 0 28px; font-style: normal; }
.ticker a { color: var(--gold); text-decoration: underline; }
