/* Custom site styles (overrides and additions) */
:root {
  --brand: #0b3d91;
  --accent: #0d6efd;
  --muted: #55595c; /* Darker for accessibility */
  --bg: #f6f7f9
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: #222
}

.navbar-brand img {
  max-height: 56px
}

.page-header h1 {
  display: flex;
  align-items: center;
  gap: .6rem
}

.page-header h1 i {
  color: var(--brand);
  font-size: 1.4rem
}

.icon-before {
  margin-right: .6rem;
  color: var(--brand)
}

.contact-card .form-control:focus {
  box-shadow: 0 0 0 .12rem rgba(11, 61, 145, .12);
  border-color: var(--accent)
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0
}

/* Navbar refinements */
.navbar {
  font-weight: 500
}

.navbar .nav-link {
  color: #444;
  padding: .6rem .9rem
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent) !important
}

.dropdown-menu {
  min-width: 260px;
  border-radius: .5rem
}

.dropdown-menu .dropdown-item {
  padding: .4rem .75rem
}

.dropdown-menu .dropdown-item i {
  color: var(--brand)
}

/* Hero */
.hero-section {
  background: url('/assets/img/header-nsp.webp') no-repeat center center;
  background-size: cover;
  color: #000;
  padding: 80px 0
}

.hero-section .display-4 {
  font-weight: 700
}

/* Cards & services */
.service-card {
  border: none;
  border-radius: .6rem;
  box-shadow: 0 6px 22px rgba(17, 24, 39, 0.06);
  transition: transform .25s ease
}

.service-card:hover {
  transform: translateY(-6px)
}

.service-card .icon {
  font-size: 2.2rem;
  color: var(--accent)
}

/* Footer */
footer {
  font-size: .95rem
}

@media (max-width:768px) {
  .top-bar {
    display: none
  }

  .hero-section {
    padding: 50px 0
  }
}

/* Mega dropdown styling (modern, accessible, responsive) */
.dropdown-mega {
  min-width: 320px;
  max-width: 980px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  border-radius: .6rem;
  background: #fff;
}

.dropdown-mega .fw-bold {
  color: var(--brand);
  font-size: 1rem
}

.dropdown-mega .row {
  gap: 0.5rem
}

.dropdown-mega .col-12>div {
  padding: 0
}

.dropdown-mega .dropdown-item {
  color: #27323a;
  padding: .35rem .5rem;
  border-radius: .35rem
}

.dropdown-mega .dropdown-item:hover {
  background: rgba(13, 110, 253, 0.08);
  color: var(--accent)
}

.dropdown-mega a.text-decoration-none {
  color: #0b3d91
}

/* Make the mega dropdown full-width on small screens and single-column */
@media (max-width:991px) {
  .dropdown-mega {
    max-width: 100vw;
    left: 0;
    right: 0;
    margin: 0 12px
  }

  .dropdown-mega .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%
  }
}

/* Show dropdown on hover for desktop (supports keyboard & screen-readers via JS fallback) */
@media (min-width:992px) {
  .navbar .nav-item.dropdown:hover>.dropdown-menu {
    display: block;
    opacity: 1;
    transform: none
  }
}

/* Tidy up navbar spacing */
.navbar .nav-link {
  padding: .5rem .7rem
}

.navbar-brand span {
  font-size: 1rem
}

/* Accessibility: ensure focus style visible */
.dropdown-mega .dropdown-item:focus {
  outline: 2px solid rgba(13, 110, 253, 0.18);
  outline-offset: 2px
}

/* Partner logos section */
.partner-logos .card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1rem;
}

.partner-logos .card-img-top {
  width: auto;
  max-height: 100%;
  object-fit: contain;
}

/* Accessibility & Performance Fixes */
.text-primary.bg-opacity-10 {
  color: #0d468e !important; /* Darker blue for better contrast (WCAG AA) */
}

.text-success.bg-opacity-10 {
  color: #115c3a !important; /* Darker green for better contrast */
}

.text-info.bg-opacity-10 {
  color: #044b58 !important; /* Darker teal for better contrast */
}

.text-secondary, .text-muted {
  color: #55595c !important; /* Darkened for accessibility */
}

.smaller {
  font-size: 0.825rem;
}

/* Performance hint for browser rendering */
section:not(.hero-section):not(.it-hero) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
}