:root {
  --navy: #0d2340;
  --navy-dark: #081627;
  --red: #c1272d;
  --gold: #d4a017;
  --light-bg: #f4f6f9;
  --text-muted: #5a6472;
  --brand-navbar: #4d4791;
  --brand-navbar-dark: #302c5a;
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #29323d;
  background: #fff;
}

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

/* ---- Top bar ---- */
.top-bar {
  background: var(--brand-navbar-dark);
  color: #cfd8e3;
  font-size: 0.85rem;
}
.top-bar a { color: #cfd8e3; }
.top-bar a:hover { color: #fff; }

/* ---- Header / brand ---- */
.site-header {
  background: var(--brand-navbar);
}
.brand-mark {
  height: 64px;
  width: auto;
  flex-shrink: 0;
}
.brand-text .brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0;
}
.brand-text .brand-tag {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---- Nav ---- */
.navbar-institute {
  background: #fff;
  border-bottom: 1px solid #e7eaee;
  box-shadow: 0 2px 6px rgba(13,35,64,0.06);
}
.navbar-institute .nav-link {
  color: var(--navy);
  font-weight: 600;
  padding: .9rem 1rem !important;
}
.navbar-institute .nav-link.active,
.navbar-institute .nav-link:hover {
  color: var(--red);
}
.btn-verify {
  background: var(--red);
  color: #fff !important;
  border-radius: 4px;
  padding: .5rem 1.1rem !important;
  font-weight: 700 !important;
}
.btn-verify:hover { background: var(--navy); color: #fff !important; }

/* ---- Page banner ---- */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 2.75rem 0;
}
.page-banner h1 { font-weight: 700; margin: 0; }
.page-banner .breadcrumb { margin: .4rem 0 0; font-size: .9rem; }
.page-banner .breadcrumb a { color: #cfd8e3; }
.page-banner .breadcrumb .current { color: var(--gold); }

/* ---- Hero (home) ---- */
.hero {
  background: linear-gradient(rgba(8,22,39,.78), rgba(8,22,39,.55)), var(--navy);
  color: #fff;
  padding: 4.5rem 0;
}
.hero .eyebrow {
  color: var(--gold);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .85rem;
}
.hero h1 { font-weight: 800; font-size: 2.6rem; }
.hero .lead { color: #dbe2ea; }

.stat-strip {
  background: var(--red);
  color: #fff;
}
.stat-strip .stat-num { font-size: 2rem; font-weight: 800; }
.stat-strip .stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }

/* ---- Cards ---- */
.service-card, .course-card, .team-card, .branch-card {
  border: 1px solid #e7eaee;
  border-radius: 8px;
  height: 100%;
  transition: box-shadow .2s ease, transform .2s ease;
}
.service-card:hover, .course-card:hover {
  box-shadow: 0 10px 24px rgba(13,35,64,0.10);
  transform: translateY(-2px);
}
.service-card .icon-wrap, .course-card .icon-wrap {
  width: 54px; height: 54px;
  background: rgba(193,39,45,0.1);
  color: var(--red);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.course-card .badge-duration {
  background: var(--gold);
  color: #26210a;
  font-weight: 700;
}

/* ---- Sidebar quick links ---- */
.quick-links .list-group-item {
  border: none;
  border-bottom: 1px solid #e7eaee;
  padding: .95rem 1.1rem;
  font-weight: 600;
  color: var(--navy);
  display: flex; align-items: center; gap: .6rem;
}
.quick-links .list-group-item:hover { background: var(--light-bg); color: var(--red); }
.quick-links .list-group-item.verify { color: var(--red); }

.sidebar-box {
  border: 1px solid #e7eaee;
  border-radius: 8px;
  overflow: hidden;
}
.sidebar-box .box-title {
  background: var(--navy);
  color: #fff;
  padding: .8rem 1.1rem;
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-dark);
  color: #b9c3d1;
}
.site-footer h6 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.site-footer a { color: #b9c3d1; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  background: #060f1c;
  color: #8391a3;
  font-size: .85rem;
}

/* ---- Forms ---- */
.form-card {
  border: 1px solid #e7eaee;
  border-radius: 10px;
  padding: 2rem;
}

/* ---- Verify certificate result ---- */
.cert-result {
  border-radius: 10px;
  padding: 1.75rem;
}
.cert-result.valid { background: #eaf7ee; border: 1px solid #bfe6c8; }
.cert-result.invalid { background: #fdecec; border: 1px solid #f3bcbc; }

/* ---- Gallery ---- */
.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--light-bg);
  overflow: hidden;
}
.gallery-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,22,39,0) 40%, rgba(8,22,39,.85) 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: .9rem 1rem;
  font-weight: 600;
  font-size: .92rem;
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-title { max-width: 85%; line-height: 1.25; }
.gallery-teaser-item {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
}
.gallery-teaser-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-teaser-item:hover img { transform: scale(1.08); }

/* ---- Admin panel ---- */
.admin-sidebar {
  background: var(--navy-dark);
  min-height: 100vh;
  color: #cfd8e3;
}
.admin-sidebar .nav-link { color: #cfd8e3; padding: .65rem 1rem; border-radius: 6px; }
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link:hover { background: var(--navy); color: #fff; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e7eaee; }
.stat-card { border: 1px solid #e7eaee; border-radius: 10px; }
.stat-card .num { font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.table thead th { background: var(--light-bg); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.badge-status-1 { background: #1e8e3e; }
.badge-status-0 { background: #9aa4b2; }
.badge-cert-active { background: #1e8e3e; }
.badge-cert-revoked { background: #c1272d; }
