/* --------- Global CSS and Custom overrides ------------------*/

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* full viewport height */
  scroll-behavior: smooth;
}

main {
  flex: 1;
  /* take available space */
}

/* ---------------------- Navbar Custom CSS ----------------- */
/* Topbar (desktop band above navbar) */
.topbar {
  background: var(--dibi-primary);
  color: var(--dibi-text-on-dark);
  padding-top: 6px;
  padding-bottom: 6px;
}

.topbar .dibi-text {
  font-size: 12px;
}

.topbar a.topbar-link {
  color: var(--dibi-text-on-dark);
  font-size: 1.1rem;
  /* icon sizing */
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: color .2s ease-in-out, transform .15s ease-in-out;
}

.topbar a.topbar-link:hover,
.topbar a.topbar-link:focus {
  color: var(--dibi-info);
  /* subtle hover */
  transform: translateY(-1px);
}

/* Mobile topbar inside collapse */
.topbar-mobile {
  border-top: 1px solid rgba(0, 0, 0, .06);
  margin-top: .25rem;
  padding-top: .25rem;
}

.topbar-mobile .topbar-link {
  color: var(--dibi-primary);
}

.topbar-mobile .topbar-link:hover {
  color: var(--dibi-link-hover);
}

/* Brand logo sizing */
.navbar-brand img {
  max-height: 36px;
  height: auto;
  width: auto;
  object-fit: contain;
}

/* Navbar base */
.navbar {
  background-color: var(--dibi-white) !important;
  /* white base */
  color: var(--dibi-black) !important;
  /* default text */
  border-bottom: 1px solid #e5e7eb;
  /* subtle divider */
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--dibi-black) !important;
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-item.active .nav-link {
  color: var(--dibi-primary) !important;
  /* teal hover */
}

/* Dropdown (light navbar) */
.navbar .dropdown-menu {
  background-color: var(--dibi-white);
  border: 1px solid #e5e7eb;
}

.navbar .dropdown-item {
  color: var(--dibi-black);
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item.active {
  background-color: var(--dibi-primary);
  color: var(--dibi-text-on-dark);
  /* white on teal */
}

/* Toggler: white hamburger -> white cross */
.navbar-toggler {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background-color: var(--dibi-link-hover);
  /* teal circle */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: none !important;
  width: 20px;
  height: 14px;
  position: relative;
  display: inline-block;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
  /* white bars */
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
  top: 0;
}

.navbar-toggler-icon span {
  top: 6px;
}

.navbar-toggler-icon::after {
  bottom: 0;
}

/* Expanded state */
.navbar-toggler[aria-expanded="true"] {
  background-color: #414d61;
  /* dark background */
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
  transform: rotate(45deg);
  top: 6px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
  transform: rotate(-45deg);
  bottom: 6px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span {
  opacity: 0;
}

/* Hover refinement */
.navbar-toggler:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

/* ---------------------Homepage ---------------- */
/* Hero images keep aspect and crop nicely */
.hero-img {
  max-height: 70vh;
  object-fit: cover;
}

/* Simple partner tiles if you don't have logos yet */
.partner-tile {
  display: grid;
  place-items: center;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  text-align: center;
  font-weight: 500;
}

/* Spacing tweaks */
section+section {
  scroll-margin-top: 80px;
  /* if you link to sections later */
}

/* small circular icon “bubble” */
.icon-bubble {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dibi-primary) 8%, transparent);
  /* subtle tint */
  font-size: 18px;
  line-height: 1;
}
/* Soft vignette + gradient for captions */
.carousel-item .carousel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Top-to-bottom gradient plus a subtle edge vignette */
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.0) 70%) ,
    linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.10) 45%, rgba(0,0,0,0.0) 70%);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.25);
}

/* Optional: make caption a bit more readable on small screens */
.carousel-caption {
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ------- Fancy Highlight Pillars ------------*/
.highlights {
  background: var(--dibi-info-100);
}

.pillar-box {
  background: #fff;
  border: 1px solid #e9ecef;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pillar-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.08);
}

.pillar-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.pillar-box:hover .pillar-icon {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* ------------ Partner Logo Wall ----------*/
.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 1rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.1);
}

.logo-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-frame img {
  width: 70%;
  height: auto;
  object-fit: contain;
}

/* -----------------Investegators and Team ---------- */
/* Circular avatar placeholder */
.avatar-circle {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: #f1f3f5;
  /* light grey fallback */
  overflow: hidden;
  display: grid;
  place-items: center;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* fills circle nicely */
}

.section-team h3{
  color: var(--dibi-primary);
}

.section-researchers {
  background: var(--dibi-info-100);
}

/* Researcher pills */
.researcher-pill {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .75rem .9rem;
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  background: #fff;
}

.researcher-pill .r-name {
  font-weight: 600;
}

.researcher-pill .r-org {
  color: #6c757d;
  font-size: .95rem;
}

/* Compact researcher tiles */
.researcher-tile {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.researcher-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 .75rem 1.25rem rgba(0, 0, 0, .06);
  border-color: #dee2e6;
}

/* Circle initials avatar (auto text via data-attr) */
.avatar-initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dibi-primary-100);
  color: var(--dibi-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: .5px;
  position: relative;
  text-transform: uppercase;
}

.avatar-initial::after {
  content: attr(data-initial);
  font-size: .9rem;
}

/* Org pill */
.org-pill {
  display: inline-block;
  margin-top: .15rem;
  padding: .15rem .5rem;
  font-size: .8rem;
  color: #495057;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 999px;
}

/* ---------------- Locations: visual header --------------- */
.loc-hero {
  min-height: 180px;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--dibi-primary) 85%, transparent),
      color-mix(in srgb, var(--dibi-success) 85%, transparent));
  border-bottom: 1px solid rgba(255, 255, 255, .25);
}

/* Dot bullets for locations */
.loc-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, .06);
}

/* Subtle separators between location rows */
.loc-item+.loc-item {
  border-top: 1px dashed #e9ecef;
}

/* --- Keyword cloud chips --- */
.kw-chip {
  display: inline-block;
  padding: .4rem .6rem;
  border-radius: .75rem;
  font-size: .9rem;
  border: 1px solid transparent;
  background: #f8f9fa;
  color: #343a40;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.kw-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .06);
  border-color: #e9ecef;
}

/* Category accents */
.theme-energy {
  background: #f1f8ff;
  border-color: #d9e8ff;
  color: var(--dibi-primary);
}

.theme-ops {
  background: #f0fff4;
  border-color: #d6f5e3;
  color: var(--dibi-success);
}

.theme-built {
  background: #fff5f0;
  border-color: #ffe0d6;
  color: #d9480f;
}

.theme-equity {
  background: #f8f5ff;
  border-color: #e7ddff;
  color: #6f42c1;
}

/* Legend */
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
}

.bg-theme-energy {
  background: var(--dibi-primary);
}

.bg-theme-ops {
  background: var(--dibi-success);
}

.bg-theme-built {
  background: #fd7e14;
}

.bg-theme-equity {
  background: #6f42c1;
}

.legend-text {
  font-size: .85rem;
  color: #6c757d;
}

/* --- Document list --- */
.doc-list {
  display: grid;
  gap: .5rem;
}

.doc-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem .9rem;
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.doc-item:hover {
  border-color: #dfe5ea;
  background: #f9fbff;
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .05);
}

.doc-icon {
  display: grid;
  place-items: center;
  height: 40px;
  width: 56px;
  border-radius: .5rem;
  background: var(--dibi-primary-100);
  color: var(--dibi-primary);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .5px;
}

.doc-title {
  font-weight: 600;
}

.doc-sub {
  font-size: .85rem;
}

.doc-cta {
  font-size: .85rem;
  color: var(--dibi-primary);
  font-weight: 600;
}

/* --- Timeline --- */
.timeline-item {
  position: relative;
  display: flex;
  gap: .75rem;
  padding: .75rem 0;
}

.timeline-item+.timeline-item {
  border-top: 1px dashed #e9ecef;
}

.t-dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  flex: 0 0 auto;
  margin-top: .35rem;
}

.t-meta .small {
  line-height: 1.25;
}

.cta {
  background-color: var(--dibi-secondary);
}

.cta .btn {
  font-weight: 500;
}

.cta .btn:hover,
.btn:focus,
.btn:active,
.btn:first-child:active,
.btn:focus-visible {
  background-color: var(--dibi-primary)!important;
  border-color: var(--dibi-primary)!important;
  color: #fff;
  box-shadow: none;
}

/* ======== Knowledge Hub: sticky sidebar ========= */
#hubNav .list-group-item {
  border: 1px solid #e5e7eb;
  color: var(--dibi-black);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
  display: flex;
  align-items: center;
  gap: .5rem;
}

#hubNav .list-group-item .bi {
  font-size: 1rem;
}

/* hover = link teal; active = primary */
#hubNav .list-group-item:hover {
  background-color: var(--dibi-link-hover);
  /* #009abc */
  border-color: var(--dibi-link-hover);
  color: var(--dibi-text-on-dark);
  /* white */
}

#hubNav .list-group-item.active,
#hubNav .list-group-item.active:hover,
#hubNav .list-group-item:focus.active {
  background-color: var(--dibi-primary);
  /* #006c91 */
  border-color: var(--dibi-primary);
  color: var(--dibi-text-on-dark);
}

/* subtle radius & focus */
#hubNav .list-group {
  overflow: hidden;
  border-radius: 1rem;
}

#hubNav .list-group-item:focus {
  box-shadow: 0 0 0 .15rem rgba(0, 106, 145, .15);
  outline: none;
}

/* =======GEDSI feature list ========== */
.gedsi-list {
  display: grid;
  gap: .75rem;
}

.gedsi-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}

.gedsi-item:hover {
  border-color: #dfe5ea;
  box-shadow: 0 .65rem 1.1rem rgba(0, 0, 0, .06);
  transform: translateY(-2px);
}

.gedsi-item .icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  /* default gradient (info → primary) */
  background: linear-gradient(135deg, var(--dibi-info), var(--dibi-primary));
}

/* Use primary for Principles, success/teal for Methods */
.gedsi-item.is-principle .icon {
  background: linear-gradient(135deg, var(--dibi-primary), #009abc);
}

.gedsi-item.is-method .icon {
  background: linear-gradient(135deg, var(--dibi-success), var(--dibi-primary));
}

.gedsi-item .icon i {
  font-size: 1.1rem;
  line-height: 1;
}

/* If you use custom SVGs instead of <i>, keep consistent sizing */
.gedsi-item .icon-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.gedsi-item .content strong {
  display: block;
  margin-bottom: .15rem;
  color: var(--dibi-dark);
  font-weight: 700;
}

/* Knowledge Hub: spacer between sections */
.hub-pad {
  height: clamp(16px, 4vw, 40px);
  /* mobile -> desktop */
}

/* Optional subtle divider (use instead of or with .hub-pad) */
.hub-divider {
  height: 1px;
  background: #e5e7eb;
  margin: clamp(12px, 2.5vw, 28px) 0;
  border-radius: 1px;
}

/* Resources: compact download items */
.resource-list {
  display: grid;
  gap: .5rem;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  background: #fff;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .12s ease;
}

.resource-item:hover {
  background: #f9fbff;
  border-color: #dfe5ea;
  transform: translateY(-1px);
}

.resource-item .ri-badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--dibi-primary);
  background: rgba(0, 106, 145, .08);
  border: 1px solid rgba(0, 106, 145, .22);
  padding: .15rem .5rem;
  border-radius: 999px;
}

.resource-item .ri-title {
  font-weight: 600;
  color: var(--dibi-dark);
}

.resource-item .ri-meta {
  margin-left: auto;
  font-size: .8rem;
  color: #6c757d;
}

/* Partner links: simple, elegant list */
.partner-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .6rem;
  border-radius: .5rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .12s ease;
}

.partner-link .bi {
  font-size: .95rem;
  opacity: .7;
}

.partner-link:hover {
  background: #f8fafb;
  border-color: #e5e7eb;
  transform: translateY(-1px);
}

/* Ensure links use your global anchor color (no .link-primary overrides) */
.resource-list a,
.partner-list a {
  color: inherit;
}

/* Masonry columns (responsive) */
.masonry {
  column-count: 1;
  column-gap: 1rem;
}
@media (min-width: 576px) { .masonry { column-count: 2; } }
@media (min-width: 992px) { .masonry { column-count: 3; } }
@media (min-width: 1400px){ .masonry { column-count: 4; } }

/* Items flow into columns */
.masonry-item {
  display: inline-block;
  margin: 0 0 1rem;
  width: 100%;
}
.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.event-gallary img {
  height: 220px;        
  object-fit: cover;    
  width: 100%;          
  border-radius: 0.5rem;
}

/* Media card image: uniform height + cover crop */
.media-card-img {
  width: 100%;
  height: 160px;        /* tweak to taste (140–200px) */
  object-fit: cover;
  border-radius: .5rem; /* match Bootstrap rounded-3 */
}

@media (max-width: 576px) {
  .media-card-img { height: 140px; }
}

.carousel-item img {
  height: 500px;
  object-fit: cover;
  object-position: center; 
}
@media (min-width: 1400px) {
  .carousel-item img {
    object-position: 0 30%;
  }
}

@media (min-width: 1700px) {
  .carousel-item img {
    height: 600px;
    object-position: 0 30%;
  }
}

@media (min-width: 2200px) {
  .carousel-item img {
    height: 700px;
  }
}