/* ============================================================
   SCIENTIFIC RESEARCH BD — COMMON CSS
   Used by ALL pages (public + admin)
============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue:       #0033a0;
  --blue-dk:    #002480;
  --blue-lt:    #e8f1fc;
  --blue-mid:   #1565c0;
  --teal:       #009688;
  --teal-lt:    #e0f2f1;
  --amber:      #f59e0b;
  --red:        #e53935;
  --green:      #2e7d32;
  --purple:     #6a1b9a;
  --ink:        #1a2332;
  --body:       #374151;
  --muted:      #6b7280;
  --border:     #e0e0e0;
  --surface:    #f5f7fa;
  --white:      #ffffff;
  --shadow-s:   0 2px 8px rgba(0,0,0,.08);
  --shadow-m:   0 4px 20px rgba(0,0,0,.12);
  --shadow-l:   0 12px 40px rgba(0,0,0,.18);
  --radius:     8px;
  --radius-lg:  14px;
  --ease:       cubic-bezier(.4,0,.2,1);
  --font-main:  'Nunito', 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-main); color: var(--body); background: var(--surface); line-height: 1.65; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { margin-bottom: .9rem; }

/* ── Layout Helpers ── */
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }

/* ── Page Banner ── */
.page-banner {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-dk), var(--blue-mid));
}
.page-banner img.banner-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .35;
}
.page-banner .banner-content {
  position: relative; z-index: 2;
  padding: 40px 0;
  color: #fff;
}
.page-banner h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 10px; }
.page-banner p  { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 600px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: rgba(255,255,255,.7); margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .5; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-s);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.card-body { padding: 24px; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: 8px;
  font-weight: 700; font-size: .9rem;
  transition: all .18s var(--ease);
  border: 2px solid transparent;
}
.btn-primary   { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dk); }
.btn-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue-lt); }
.btn-teal    { background: var(--teal); color: #fff; }
.btn-teal:hover { opacity: .9; }
.btn-red     { background: var(--red); color: #fff; }
.btn-red:hover { opacity: .9; }
.btn-sm { padding: 7px 15px; font-size: .82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .74rem; font-weight: 700; letter-spacing: .3px;
}
.badge-oa    { background: #e8f5e9; color: #2e7d32; }
.badge-sub   { background: #fff3e0; color: #e65100; }
.badge-blue  { background: var(--blue-lt); color: var(--blue); }
.badge-green { background: #e8f5e9; color: var(--green); }
.badge-red   { background: #ffebee; color: var(--red); }
.badge-muted { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* ── Form Elements ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 700; font-size: .88rem; color: var(--ink); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: .95rem; color: var(--body);
  background: #fff; transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,51,160,.1); }
.form-control-sm { padding: 8px 12px; font-size: .88rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-s); }
.table {
  width: 100%; border-collapse: collapse;
  background: #fff; font-size: .9rem;
}
.table th { background: #f1f5f9; color: var(--ink); font-weight: 700; padding: 12px 16px; text-align: left; border-bottom: 2px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tr:hover td { background: #f8fafc; }
.table tr:last-child td { border-bottom: none; }

/* ── Alerts ── */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; border-left: 4px solid; }
.alert-success { background: #e8f5e9; border-color: var(--green); color: var(--green); }
.alert-error   { background: #ffebee; border-color: var(--red); color: var(--red); }
.alert-info    { background: var(--blue-lt); border-color: var(--blue); color: var(--blue-dk); }
.alert-warn    { background: #fff8e1; border-color: var(--amber); color: #856404; }

/* ── Page Sections ── */
.content-section { padding: 50px 0; }
.section-title { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--ink); margin-bottom: 8px; }
.section-subtitle { color: var(--muted); font-size: 1rem; margin-bottom: 36px; }
.section-divider { width: 48px; height: 3px; background: var(--blue); border-radius: 4px; margin-bottom: 16px; }

/* ── Info/Feature Blocks ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.info-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 28px 24px; border: 1px solid var(--border);
  box-shadow: var(--shadow-s);
  transition: transform .2s, box-shadow .2s;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.info-card-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 16px; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.info-card p  { color: var(--muted); font-size: .9rem; margin: 0; }

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-top: 32px; }
.step { text-align: center; padding: 28px 20px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.step h4 { margin-bottom: 8px; }
.step p  { color: var(--muted); font-size: .9rem; margin: 0; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { padding: 18px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--ink); }
.faq-q:hover { color: var(--blue); }
.faq-a { padding: 0 0 18px; color: var(--muted); font-size: .95rem; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .2s; font-size: 1.2rem; color: var(--muted); }

/* ── News / Blog Cards ── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.news-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-s); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.news-card-img { width: 100%; height: 200px; object-fit: cover; }
.news-card-img-placeholder { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.news-card-body { padding: 20px; }
.news-card-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--blue); margin-bottom: 8px; }
.news-card-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; line-height: 1.4; }
.news-card-title:hover { color: var(--blue); }
.news-card-summary { font-size: .88rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.news-card-meta { font-size: .78rem; color: #9ca3af; }

/* ── Footer ── */
.site-footer { background: #1a2332; color: #9ca3af; padding: 60px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: #6b7280; font-size: .9rem; margin-top: 12px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col a { display: block; color: #6b7280; font-size: .88rem; padding: 3px 0; transition: color .15s; }
.footer-col a:hover { color: #d1d5db; }
.footer-bottom { border-top: 1px solid #2d3748; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: #4b5563; }
.footer-logo-text { color: #fff; font-weight: 800; font-size: 1.1rem; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: #1a2332; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: .92rem; font-weight: 600; box-shadow: var(--shadow-l);
  transform: translateY(100px); opacity: 0; transition: all .3s var(--ease);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .info-grid   { grid-template-columns: 1fr; }
  .steps       { grid-template-columns: 1fr; }
  .container   { padding: 0 16px; }
  .page-banner { min-height: 180px; }
}
