/* =========================================================
   Central Research Facility — Institutional theme
   Flat, print-like, professional. No gradients, no blur,
   no hover-lift/zoom motion, single typeface.
   Palette: Navy #14365c / Gold #a9762f / Ink #1f2937
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --navy:        #14365c;
  --navy-dark:   #0d2740;
  --orange:      #e67e22;
  --orange-soft: #f7941d;
  --orange-dark: #ff0000;
  --bg-page:     #f5f6f8;
  --paper:       #ffffff;
  --ink:         #1f2937;
  --muted:       #5b6472;
  --line:        #e2e5ea;
  --line-strong: #ccd2d9;

  --shadow-sm: 0 1px 2px rgba(20, 54, 92, 0.06);
  --shadow-md: 0 2px 10px rgba(20, 54, 92, 0.08);

  --radius:    6px;
  --radius-lg: 8px;

  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-page);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  margin-top: 0;
}

p { line-height: 1.75; }

::selection { background: var(--orange-soft); color: var(--navy-dark); }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--orange); }

.text-teal   { color: var(--orange) !important; }
.text-navy   { color: var(--navy) !important; }
.bg-navy     { background: var(--navy) !important; color: #fff; }
.bg-ivory    { background: var(--bg-page) !important; }

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: 1rem;
  background: var(--navy); color: #fff;
  padding: .5rem .75rem; border-radius: 4px; z-index: 2000;
}

/* ---------------- Navbar ---------------- */
.crf-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: .75rem 0;
}
.crf-navbar.scrolled { box-shadow: var(--shadow-sm); }

.brand-mark { display: inline-flex; align-items: center; justify-content: center; }
.brand-mark-lg { font-size: 1.1rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; letter-spacing: .3px; color: var(--orange); font-size: 1.05rem; }
.brand-text:hover .brand-name { color: var(--orange-dark); }
.brand-sub  { font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--orange); margin-top: 2px; }

.crf-navbar .nav-link {
  color: var(--orange); font-weight: 600; padding: .55rem .9rem !important;
  border-bottom: 2px solid transparent;
}
.crf-navbar .nav-link:hover { color: var(--orange-dark); }
.crf-navbar .nav-link.active {
  color: var(--orange); border-bottom-color: var(--orange);
}
.crf-navbar .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .35rem;
  box-shadow: var(--shadow-md);
  margin-top: .4rem;
}
.crf-navbar .dropdown-item { border-radius: 4px; font-weight: 500; padding: .5rem .75rem; }
.crf-navbar .dropdown-item:hover { background: var(--bg-page); color: var(--orange-dark); }

/* ---------------- Buttons ---------------- */
.btn-crf {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .95rem; padding: .7rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-crf.btn-primary-crf {
  background: var(--orange-soft); color: #fff; border-color: var(--navy);
}
.btn-crf.btn-primary-crf:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }
.btn-crf.btn-outline-crf {
  background: transparent; color: var(--orange-soft); border-color: var(--orange);
}
.btn-crf.btn-outline-crf:hover { background: var(--orange); color: #fff; }
.btn-crf.btn-ghost-crf {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.55);
}
.btn-crf.btn-ghost-crf:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-crf i { font-size: .9em; }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(160deg, rgba(7,26,51,0.90) 0%, rgba(11,37,69,0.82) 55%, rgba(18,52,95,0.55) 100%),
    url('../images/hero.jpeg') center center / cover no-repeat;
  color: #fff;
  padding: 3.25rem 0 3.75rem;
  border-bottom: 3px solid var(--orange);
}
.hero.hero-sub { padding: 2.75rem 0 3rem; }

.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--orange-soft);
  text-transform: uppercase; letter-spacing: 2px; font-size: .78rem; font-weight: 700;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--orange);
}
.hero h1 {
  color: #fff; font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem); line-height: 1.15;
  margin: 1.1rem 0 .9rem;
}
.hero h1 .accent { color: var(--orange-soft); }
.hero p.lead-hero {
  font-size: 1.02rem;
  color: rgba(255,255,255,0.82); max-width: 640px;
}
.hero-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; }

.hero .hero-side {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
}
.hero .hero-side img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1/1.04; }

.hero-badge {
  margin-top: .9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  color: #fff;
}
.hero-badge .label { font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--orange-soft); }
.hero-badge .value { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.hero-badge-sub { font-size: .88rem; color: rgba(255,255,255,0.75); font-weight: 500; }

/* ---------------- Section building blocks ---------------- */
.section { padding: 1.5rem 0; }
.section + .section { padding-top: 4rem; }

.eyebrow-sm {
  display: inline-block;
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .76rem;
  margin-bottom: .6rem;
}
.section-title {
  font-weight: 800;
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: .75rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--orange);
  margin-top: .75rem;
}
.section-title em { font-style: normal; color: var(--orange); }
.section-lead { color: var(--muted); max-width: 760px; font-size: 1.02rem; line-height: 1.75; }

/* Breadcrumb */
.crf-breadcrumb {
  padding: .9rem 0; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.crf-breadcrumb .breadcrumb { margin: 0; font-size: .92rem; }
.crf-breadcrumb a { color: var(--muted); font-weight: 500; }
.crf-breadcrumb a:hover { color: var(--navy); }
.crf-breadcrumb .active { color: var(--navy); font-weight: 700; }
.crf-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: "/"; color: var(--line-strong); }

/* ---------------- CTA strip ---------------- */
.cta-strip {
  background: rgba(24, 129, 249, 0.3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-strip-inner {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
}
.cta-strip-text {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}
.cta-strip-icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--orange-dark);
  color: var(--orange-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.cta-strip-title { font-weight: 700; color: var(--navy-dark); font-size: 1.4rem; }
.cta-strip-title span {
  color: var(--orange-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .18rem 0;
}
.cta-strip-sub { color: var(--muted); font-size: .9rem; }
.cta-strip .btn-crf { flex: 0 0 auto; }

@media (max-width: 575.98px) {
  .cta-strip-inner {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 0;
  }
  .cta-strip .btn-crf { align-self: stretch; justify-content: center; }
}

/* ---------------- Cards ---------------- */
.dept-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  height: 100%; display: flex; flex-direction: column;
}
.dept-card:hover { border-color: var(--orange); box-shadow: var(--shadow-md); }
.dept-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--line); }
.dept-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dept-card .thumb .badge-icon {
  position: absolute; top: 12px; left: 12px; width: 40px; height: 40px;
  border-radius: var(--radius); background: rgba(13,39,64,0.82);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.dept-card .body { padding: 1.25rem 1.3rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.dept-card .title { font-weight: 700; color: var(--navy); font-size: 1.18rem; margin: 0 0 .5rem; }
.dept-card:hover .title {color: var(--orange);}
.dept-card .desc  { color: var(--muted); margin: 0 0 1.1rem; flex: 1; font-size: .95rem; }
.dept-card .cta {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--navy); font-weight: 700; font-size: .93rem;
  border-top: 1px solid var(--line); padding-top: .9rem;
}
.dept-card:hover .cta { color: var(--orange-dark); }

/* Department resource card (Supervisors / Softwares / Labs / MoUs links) */
.fac-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--orange);
  overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.fac-card:hover { border-color: var(--line); box-shadow: var(--shadow-md); }
.fac-card .body { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.fac-card h5 { color: var(--navy); font-weight: 700; margin-bottom: .5rem; font-size: 1.1rem; }
.fac-card:hover h5 {color: var(--orange);}
.fac-card p  { color: var(--muted); margin-bottom: 1.1rem; flex: 1; font-size: .95rem; }
.fac-card .know {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius);
  background: var(--orange); color: #fff; font-weight: 700; font-size: .88rem;
  transition: background-color .15s ease;
}
.fac-card .know:hover { background: var(--orange-dark); color: #fff; }

/* ---------------- Tables (Supervisors / Softwares / Labs / MoUs) ---------------- */
.table-responsive { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); }
.table { margin: 0; }
.table thead th {
  background: var(--orange-soft); color: #fff; font-weight: 700;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .6px;
  border: none; padding: .85rem 1rem; vertical-align: middle;
}
.table tbody td { padding: .85rem 1rem; vertical-align: middle; border-color: var(--line); font-size: .95rem; color: var(--ink); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: var(--bg-page); }

.badge-type {
  display: inline-block; padding: .28rem .65rem; border-radius: var(--radius);
  background: rgba(20,54,92,0.08); color: var(--navy); font-weight: 700;
  font-size: .74rem; letter-spacing: .3px; white-space: nowrap;
}
.no-results { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); }

/* ---------------- Footer ---------------- */
.crf-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.78);
  padding: 2.5rem 0 1rem;
  border-top: 3px solid var(--orange);
}
.footer-heading {
  text-transform: uppercase; letter-spacing: 1.5px; font-size: .76rem;
  color: var(--orange-soft); font-weight: 700; margin-bottom: 1rem;
}
.footer-text { color: rgba(255,255,255,0.72); font-size: .94rem; line-height: 1.75; }
.footer-links li a, .footer-contact a {
  color: rgba(255,255,255,0.78); font-weight: 500; display: inline-flex; align-items: center; gap: .5rem;
  padding: .18rem 0;
}
.footer-links li a i { font-size: .6rem; color: var(--orange); }
.footer-links li a:hover, .footer-contact a:hover { color: var(--orange-soft); }
.footer-contact li { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .75rem; color: rgba(255,255,255,0.78); }
.footer-icon {
  min-width: 30px; height: 30px; border-radius: var(--radius);
  background: rgba(255,255,255,0.08); color: var(--orange-soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: .82rem;
}
.footer-divider { border-color: rgba(255,255,255,0.14); margin: 1.75rem 0 1.1rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap; font-size: .85rem;
}

/* Back to top */
.back-top {
  position: fixed; bottom: 22px; right: 22px;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; box-shadow: var(--shadow-md);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 999; transition: background-color .15s ease;
}
.back-top:hover { background: var(--navy-dark); }
.back-top.show { display: inline-flex; }

/* 404 page */
.notfound {
  min-height: 50vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1rem;
}
.notfound .big {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800; color: var(--navy); line-height: 1;
}

/* Utility */
.divider-dot { color: var(--line-strong); margin: 0 .35rem; }
img { max-width: 100%; height: auto; }
