﻿/* =========================================================
   IBS HEADER (CLASH-PROOF)
   Scope: everything under .ibs-hdr
   ========================================================= */

/* Theme vars (safe even if other CSS also defines :root) */
:root{
  --ibs-hdr-blue:#393185;
  --ibs-hdr-red:#E31E24;
  --ibs-hdr-border:#e5e7eb;
  --ibs-hdr-muted:#6b7280;
  --ibs-hdr-ink:#111827;
  --ibs-hdr-bg:#f5f7fb;
  --ibs-hdr-topbar-h:38px;
  --ibs-hdr-navbar-h:60px;
}

/* Apply page offset only when header is present */
body.has-ibs-header{
  padding-top: calc(var(--ibs-hdr-topbar-h) + var(--ibs-hdr-navbar-h));
}

/* ===== Wrapper fixed header (topbar + navbar) ===== */
.ibs-hdr{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
}

/* =========================================================
   TOP BAR
   ========================================================= */
.ibs-hdr__topbar{
  height: var(--ibs-hdr-topbar-h);
  background: var(--ibs-hdr-red);
  display:flex;
  align-items:center;
}

.ibs-hdr__topbar .container-fluid{
  display:flex;
  align-items:center;
  gap:14px;
  height:100%;
  max-width:1650px;
}

/* Social icons */
.ibs-hdr__social{
  display:flex;
  gap:14px;
  align-items:center;
  flex: 0 0 auto;
  min-width:max-content;
}

.ibs-hdr__social a{
  color:#fff;
  font-size:14px;
  opacity:.92;
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  text-decoration:none;
}

.ibs-hdr__social a:hover{
  opacity:1;
  background: rgba(255,255,255,.12);
}

/* Desktop quick links line */
.ibs-hdr__quicklinks{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:18px;
  white-space:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.ibs-hdr__quicklinks::-webkit-scrollbar{ display:none; }

.ibs-hdr__quicklinks a{
  position:relative;
  color:#fff;
  font-size:13px;
  text-decoration:none;
  opacity:.95;
  flex: 0 0 auto;
}
.ibs-hdr__quicklinks a:hover{ color:#FFD700; opacity:1; }
.ibs-hdr__quicklinks a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0;
  height:2px;
  background:#FFD700;
  transition: width .25s ease;
}
.ibs-hdr__quicklinks a:hover::after{ width:100%; }

/* Mobile toggle (ellipsis) */
.ibs-hdr__m-toggle{
  margin-left:auto;
  color:#fff;
  font-size:20px;
  cursor:pointer;
  display:none; /* enabled in mobile via media query */
  width:34px;
  height:34px;
  border-radius:10px;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
.ibs-hdr__m-toggle:hover{ background: rgba(255,255,255,.12); }

/* =========================================================
   MOBILE QUICK LINKS PANEL
   ========================================================= */
.ibs-hdr__m-menu{
  position: fixed;
  top: calc(var(--ibs-hdr-topbar-h) + 8px);
  right: 12px;
  width: 260px;
  background:#fff;
  border-radius:12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.18);
  padding: 8px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events:none;
  transition:.25s ease;
  z-index: 1300;
}
.ibs-hdr__m-menu.is-open{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}

.ibs-hdr__m-title{
  font-size:12px;
  color: var(--ibs-hdr-muted);
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:10px 10px 6px;
}

.ibs-hdr__m-menu a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-radius:10px;
  color:#111827;
  text-decoration:none;
  font-size:13.5px;
  font-weight:600;
}
.ibs-hdr__m-menu a i{
  color: var(--ibs-hdr-blue);
  width:18px;
}
.ibs-hdr__m-menu a:hover{ background:#f4f6fb; }

/* =========================================================
   NAVBAR
   ========================================================= */
.ibs-hdr__nav{
  height: var(--ibs-hdr-navbar-h);
  background:#fff;
  border-bottom: 2px solid rgba(88,87,95,.22);
  display:flex;
  align-items:center;
  padding-top:0px;
}

.ibs-hdr__nav .container{
  height:100%;
  display:flex;
  align-items:center;
}

.ibs-hdr__logo{
  height:60px;
  width:auto;
  display:block;
}

/* Scope Bootstrap nav appearance */
.ibs-hdr .navbar-nav{ align-items: center; }

/* IMPORTANT: scope by .ibs-hdr so it won't affect other navs */
.ibs-hdr .nav-link{
  font-weight:800;
  color: var(--ibs-hdr-blue) !important;
  padding: .55rem .60rem !important;
  border-radius: 10px;
  white-space: nowrap;
}
.ibs-hdr .nav-link:hover{
  color: var(--ibs-hdr-red) !important;
  background: rgba(57,49,133,.06);
}

/* Toggler */
.ibs-hdr .navbar-toggler{ border:none; }
.ibs-hdr .navbar-toggler:focus{ box-shadow:none; }
.ibs-hdr .navbar-toggler-icon{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(57,49,133,1)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Dropdown menus (Bootstrap) */
.ibs-hdr .dropdown-menu{
  border:1px solid var(--ibs-hdr-border);
  border-radius:12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  padding:10px;
  z-index: 2000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ibs-hdr .dropdown-item{
  font-weight:700;
  color: var(--ibs-hdr-blue);
  border-radius:10px;
  padding: 9px 10px;
  white-space: nowrap;
}
.ibs-hdr .dropdown-item:hover,
.ibs-hdr .dropdown-item:focus{
  background-color: var(--ibs-hdr-red) !important;
  color:#fff !important;
}

/* =========================================================
   MEGA MENU (desktop)
   Markup should use: .ibs-hdr__mega .dropdown-menu
   ========================================================= */
@media (min-width: 992px) {
    .ibs-hdr__mega {
        position: static;
    }

    .ibs-hdr__mega .dropdown-menu {
        width: min(700px, calc(100vw - 60px));
        left: 40%;
        transform: translateX(-50%);
        top: calc(var(--ibs-hdr-navbar-h) - 10px);
        padding: 0;
        border-radius: 14px;
        overflow: hidden;
    }
}

.ibs-hdr__mega .dropdown-menu{
  background:#fff;
}

/* mega inner */
.ibs-hdr__mega-title{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--ibs-hdr-muted);
  font-weight:900;
  margin-bottom:10px;
}

.ibs-hdr__mega-links a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-radius:10px;
  text-decoration:none;
  color:#111827;
  font-weight:800;
  font-size:14px;
  white-space: nowrap;
}
.ibs-hdr__mega-links a i{
  color: var(--ibs-hdr-blue);
  width:18px;
}
    .ibs-hdr__mega-links a:hover,
    .ibs-hdr__mega-links a:hover i {
        background-color: var(--ibs-hdr-red) !important;
        color: #fff !important;
    }

.ibs-hdr__mega-card{
  border:1px solid var(--ibs-hdr-border);
  border-radius:14px;
  background:#fbfcff;
  padding:14px;
}
.ibs-hdr__mega-card .kicker{
  font-size:12px;
  color: var(--ibs-hdr-muted);
  font-weight:900;
}
.ibs-hdr__mega-card h6{
  margin:6px 0 8px;
  font-weight:900;
  color: var(--ibs-hdr-blue);
}

.ibs-hdr__badge{
  background: rgba(57,49,133,.08);
  color: var(--ibs-hdr-blue);
  font-weight:900;
  border: 1px solid rgba(57,49,133,.14);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991.98px){
  .ibs-hdr__quicklinks{ display:none !important; }
  .ibs-hdr__m-toggle{ display:inline-flex; }

  .ibs-hdr .navbar-collapse{
    background:#fff;
    padding:18px;
    border-top:1px solid var(--ibs-hdr-border);
    max-height: 90vh;
    overflow-y: auto;
  }

 

  .ibs-hdr .dropdown-menu{
    border:none;
    box-shadow:none;
    padding-left:12px;
  }

  /* mega becomes stacked */
  .ibs-hdr__mega .dropdown-menu{
    width: 100% !important;
    left: auto !important;
    transform: none !important;
    top: auto !important;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius:0;
    overflow: visible;
  }

  .ibs-hdr__mega-card{
    border:none;
    background: transparent;
    padding: 0;
  }
}

/* Optional: tighter topbar link spacing on medium desktop */
@media (max-width: 1200px) and (min-width: 992px){
  .ibs-hdr__quicklinks{ gap: 14px; }
  .ibs-hdr__quicklinks a{ font-size: 12.5px; }
  .ibs-hdr__nav .container {
        max-width: 1024px;
    }
  .ibs-hdr .nav-link{
  padding: .55rem .40rem !important;
}
}
.ibs-hdr__mega .dropdown-menu .row {
    max-width: 700px;
    margin: auto;
}