/* Default (light hero e.g., Home) uses template colors */

/* Dark hero pages: make nav links/icons white until sticky */
.has-dark-hero #topnav:not(.nav-sticky) .navigation-menu > li > a {
  color: #fff;
}
.has-dark-hero #topnav:not(.nav-sticky) [data-feather] {
  stroke: #fff;
}
.has-dark-hero #topnav:not(.nav-sticky) .menu-extras .navbar-toggle span {
  background: #fff;
}

/* If your logo has light/dark variants */
#topnav .logo .logo-light {
  display: none;
}
.has-dark-hero #topnav:not(.nav-sticky) .logo .logo-dark {
  display: none;
}
.has-dark-hero #topnav:not(.nav-sticky) .logo .logo-light {
  display: inline-block;
}

/* Sticky state (after scroll) returns to default dark text */
#topnav.nav-sticky .navigation-menu > li > a {
  color: #0f172a;
}
#topnav.nav-sticky [data-feather] {
  stroke: #0f172a;
}

/* If gradient is used */
.bg-gradient-overlay {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
}

.cert-logo {
  padding: 6px; /* spacing inside border */
  background-color: #fff; /* keeps logos clean if they have transparency */
}

.text-justify {
  text-align: justify !important;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.hero-img {
  width: 100%;
  height: 550px; /* adjust height as you like */
  object-fit: cover; /* keeps aspect ratio but crops nicely */
  border-radius: 0px; /* optional: rounded corners */
}

/* Partner logo hover effect */
.cert-card img {
  filter: grayscale(100%);
  transition: all 0.4s ease-in-out;
}

.cert-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* ==== Fix: has-dark-hero pages on mobile should use dark logo + dark links ==== */
@media (max-width: 991.98px) {
  body.has-dark-hero #topnav:not(.nav-sticky) .logo .logo-light {
    display: none !important;
  }
  body.has-dark-hero #topnav:not(.nav-sticky) .logo .logo-dark {
    display: inline-block !important;
  }
  body.has-dark-hero #topnav:not(.nav-sticky) .navigation-menu > li > a {
    color: #0f172a !important;
  }
  body.has-dark-hero #topnav:not(.nav-sticky) .navbar-toggle span {
    background: #0f172a !important;
  }
}

/* ==== MOBILE SUBMENU FIX (final) ==== */
@media (max-width: 991.98px) {
  #topnav .navigation-menu > li > .submenu {
    display: none !important;
    position: static !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #topnav .navigation-menu > li.open > .submenu {
    display: block !important;
  }
  #topnav .navigation-menu > li > .submenu > li > a {
    display: block;
    padding: 10px 16px 10px 32px;
  }
  #topnav .navigation-menu > li.has-submenu > .menu-arrow {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease;
  }
  #topnav .navigation-menu > li.has-submenu.open > .menu-arrow {
    transform: rotate(180deg);
  }
}

@media (max-width: 991.98px) {
  #topnav .navigation-menu > li.has-submenu > .menu-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
  }
}

/* ===== Vision & Mission (border accent) ===== */
#vision-mission .vm-title {
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
  display: inline-block;
}
#vision-mission .vm-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: #4551aa;
}

#vision-mission .vm-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#vision-mission .vm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

#vision-mission .border-accent {
  border-color: #4551aa !important;
}

#vision-mission .vm-icon {
  font-size: 1.5rem;
  color: #4551aa;
}

/* ===== Director Profile styling ===== */
#director .dir-title {
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
  display: inline-block;
}
#director .dir-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: #4551aa;
}

#director .director-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#director .director-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.border-accent {
  border-color: #4551aa !important;
}

/* === Modern Services Grid (full image, clean frame, uniform cards) === */
:root {
  --service-aspect: 4/3; /* try 16/10 or 1/1 if you prefer */
  --service-radius: 0.9rem;
  --service-bg: #f6f7fb;
}

/* Services Section Modern Look */
.service-card {
  border: 0;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  background: #fdfdfd;
}

/* Service Image */
.service-card .service-img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover; /* cropped uniform style */
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  display: block;
  transition: transform 0.35s ease;
}
.service-card:hover .service-img {
  transform: scale(1.05); /* smooth zoom on hover */
}

/* Card Body */
.service-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  padding: 1rem 1.2rem 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
}

/* Titles */
.service-card .card-title {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  color: #0b1e3b; /* your brand navy */
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

/* Subtle accent strip at the bottom */
.service-card::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #4551aa 0%, #0d6efd 100%);
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

/* Client Logos – Interactive Hover (no grayscale) */
.picture-item[data-groups*='"clients"'] .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.picture-item[data-groups*='"clients"'] .card-img img {
  transition: transform 0.3s ease;
}

/* Hover Effects */
.picture-item[data-groups*='"clients"']:hover .card {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.picture-item[data-groups*='"clients"']:hover .card-img img {
  transform: scale(1.08);
}

/* Brand colors */
:root {
  --accent: #4551aa; /* indigo accent */
  --accent-dark: #0b1e3b; /* deep blue */
}

/* Base service card styling */
.service-card {
  border: 1px solid rgba(11, 30, 59, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  background: #fff;
}

.service-card .service-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

/* Accent bar at the bottom */
.service-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  opacity: 0.9;
}

/* Hover effects */
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(11, 30, 59, 0.15);
  border-color: rgba(69, 81, 170, 0.25);
}

.service-card:hover .service-img {
  transform: scale(1.04);
}

/* Card title clean and simple */
.service-card .card-title {
  color: var(--accent-dark);
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* ===== Experience page (experience.html) ===== */
.kpi-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(11, 30, 59, 0.06);
  padding: 18px 16px;
  text-align: center;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.kpi-label {
  font-size: 0.875rem;
  color: #6c757d;
}
.section-subtle {
  background: #f8fafc;
}

/* Table styles */
.table-wrapper {
  border-radius: 14px;
  overflow: auto;
  box-shadow: 0 8px 24px rgba(11, 30, 59, 0.06);
}
.exp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0b1e3b;
  color: #fff;
  border-color: #0b1e3b;
  vertical-align: middle;
}
.exp-table td,
.exp-table th {
  vertical-align: top;
}
.exp-table td:nth-child(1) {
  white-space: nowrap;
  width: 72px;
}
.exp-table td:nth-child(2) {
  min-width: 220px;
}
.exp-table td:nth-child(3) {
  min-width: 200px;
}
.exp-table td:nth-child(4) {
  min-width: 320px;
}

/* DataTables: pagination only (hide global search/length) */
.dt-search,
.dt-length {
  display: none !important;
}
.dt-info {
  padding: 12px;
}
.pagination {
  margin: 8px;
}

/* ===== Experience map ===== */
.map-container {
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 30, 59, 0.06);
}
.map-toolbar .btn {
  border-radius: 999px;
}
.leaflet-container a {
  color: #0b1e3b;
} /* keep links readable in popups */

/* ===== Prettier Leaflet UI ===== */

/* brand color tweak (optional) */
:root {
  --pts-brand: #0b1e3b; /* your navy */
  --pts-accent: #3d8bfd; /* soft blue accent */
  --mc-small: #7bc6ff; /* cluster small */
  --mc-medium: #3d8bfd; /* cluster mid */
  --mc-large: #0b1e3b; /* cluster large */
}

/* dot marker */
.pin.pin--brand {
  width: 12px;
  height: 12px;
  background: var(--pts-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(11, 30, 59, 0.25);
}

/* cluster bubbles */
.mc-wrap {
  background: transparent !important;
  border: none !important;
}
.mc {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(11, 30, 59, 0.15);
}
.mc-small {
  width: 36px;
  height: 36px;
  background: var(--mc-small);
}
.mc-medium {
  width: 44px;
  height: 44px;
  background: var(--mc-medium);
}
.mc-large {
  width: 52px;
  height: 52px;
  background: var(--mc-large);
}
.mc span {
  transform: translateY(1px);
}

/* zoom control polish */
.leaflet-control-zoom a {
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--pts-brand) !important;
  box-shadow: 0 6px 18px rgba(11, 30, 59, 0.12);
  border: 1px solid rgba(11, 30, 59, 0.08);
}

/* prevent accidental grayscale/opacity on Leaflet tiles */
.leaflet-tile,
.leaflet-layer {
  filter: none !important;
  opacity: 1 !important;
}

/* basemap container you already have */
.map-container {
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 30, 59, 0.06);
}

@media (min-width: 992px) {
  #experienceMap.map-container {
    height: 560px;
  }
}

/* Experience table polish */
.dataTables_filter,
.dataTables_length {
  display: none !important;
} /* hard-hide any residual controls */
#experienceTable th:first-child,
#experienceTable td:first-child {
  width: 72px;
} /* narrow "No." column */
.exp-table td {
  white-space: normal;
} /* wrap long descriptions */

/* Force experience table header color */
.table#experienceTable thead th {
  background-color: #4551aa !important;
  color: #fff !important;
  border-color: #4551aa !important;
  font-weight: 600;
}

/* KPI counter color */
.kpi-card .kpi-value {
  color: #4551aa !important;
  font-weight: 700;
}

/* Compact table styling for Experience page */
#experienceTable {
  font-size: 0.875rem; /* ~14px */
}

#experienceTable th,
#experienceTable td {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  vertical-align: middle;
}

#experienceTable thead th {
  background-color: #4551aa !important;
  color: #fff !important;
  border-color: #4551aa !important;
  font-weight: 600;
  font-size: 0.9rem; /* slightly larger than body text */
}

/* ---------- CLIENT LOGO GRID ---------- */
.logo-slot {
  height: 110px;
  padding: 10px;
  overflow: visible;
}
.client-logo {
  max-height: 60px;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: transform 0.25s ease, filter 0.25s ease;
}
.client-logo:hover {
  transform: scale(1.05);
  filter: grayscale(0%);
}

/* Clients */
.logo-slot {
  height: 110px;
  padding: 10px;
}
.client-logo {
  max-height: 300px;
  max-width: 220px;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.client-logo:hover {
  transform: scale(1.05);
  filter: grayscale(0%);
}

/* CSS Masonry layout (non-clients) */
#grid {
  position: relative;
}
.picture-item {
  padding: 8px;
  transition: all 0.25s ease;
}
.masonry-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.masonry-img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* Fade-in effect for portfolio items */
.picture-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* When Shuffle makes them visible */
.picture-item.shuffle-item--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional: smoother filtering transitions */
.shuffle-item {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Base style for all cards */
.card.portfolio .card-img {
  overflow: hidden;
  position: relative;
  border: 1px solid transparent;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Hover effect for everything except .clients */
.picture-item:not([data-groups*="clients"]) .card.portfolio .card-img:hover {
  transform: scale(1.03);
  border-color: rgba(69, 81, 170, 0.3); /* subtle brand color border */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Optional: soft overlay tint for better contrast on white backgrounds */
.picture-item:not([data-groups*="clients"]) .card.portfolio .card-img:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(69, 81, 170, 0.15); /* your brand color overlay */
  transition: opacity 0.3s ease;
  opacity: 1;
}

/* Start transparent */
.picture-item:not([data-groups*="clients"]) .card.portfolio .card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(69, 81, 170, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Keep client logos flat (no hover, no border) */
.picture-item[data-groups*="clients"] .card.portfolio .card-img {
  border: none;
  box-shadow: none;
  transform: none !important;
}
.picture-item[data-groups*="clients"] .card.portfolio .card-img:hover::after {
  opacity: 0;
}

/* Optional: rounded corners for nicer frame */
.card.portfolio img {
  border-radius: 8px;
}

.picture-item:not([data-groups*="clients"]) .card.portfolio .card-img {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Custom pagination active state */
nav[data-role="pager"] .page-item.active .page-link {
  background-color: #4551aa; /* brand color */
  border-color: #4551aa;
  color: #fff;
  box-shadow: 0 0 0 0.15rem rgba(69, 81, 170, 0.25);
}

nav[data-role="pager"] .page-item .page-link {
  color: #4551aa;
  transition: all 0.2s ease;
}

nav[data-role="pager"] .page-item .page-link:hover {
  background-color: rgba(69, 81, 170, 0.1);
}
