/* C:\xampp\htdocs\techsolution\css\header.css */
/* UPDATED: Dark header with subtle red effect + sliding nav underline */

:root {
  --red       : #D0021B;
  --red-soft  : rgba(208,2,27,0.10);
  --black     : #0d0d0d;
  --white     : #ffffff;
  --glass-dark   : rgba(10,10,12,0.55);
  --glass-light  : rgba(255,255,255,0.55);
  --glass-blur   : 22px;
  --glass-border : rgba(255,255,255,0.18);
  --glass-shadow : 0 8px 40px rgba(0,0,0,0.18);
  --header-total : 128px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: 'DM Sans', sans-serif; background: #ffffff; color: var(--black); }

#ts-header { position: sticky; top: 0; z-index: 1000; }
#ts-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(13,13,18,0.85);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(208,2,27,0.45);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
#ts-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: radial-gradient(ellipse at center, rgba(208,2,27,0.7) 0%, transparent 80%);
  z-index: -1; pointer-events: none;
}
#ts-header.ts-shrunk::before {
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid rgba(208,2,27,0.6);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
#ts-header.ts-shrunk .ts-logo img      { height: 100px; transition: height 0.35s ease; }
#ts-header.ts-shrunk .ts-top-row       { padding-bottom: 3px; font-size: 12px; }
#ts-header.ts-shrunk .ts-nav .nav-link { font-size: 13px; padding: 6px 10px; }
#ts-header.ts-shrunk .btn-ts           { font-size: 11.5px; padding: 6px 14px; }
#ts-header.ts-shrunk .ts-icon-link     { width: 32px; height: 32px; font-size: 14px; }

.ts-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 2.5rem 10px 2rem; gap: 1.5rem; transition: padding 0.35s ease;
}
#ts-header.ts-shrunk .ts-header-inner { padding: 4px 2.5rem 4px 2rem; }

.ts-right-col { flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; flex: 1; }
.ts-top-row {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: padding 0.35s ease; color: #f0f0f0;
}
.ts-bot-row { display: flex; align-items: center; padding-top: 4px; }
.ts-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; margin-right: 2rem; }
.ts-logo img { height: 130px; width: auto; object-fit: contain; transition: height 0.35s ease; }

/* ── NAV + SLIDING GLIDER ──────────────────────────────────────────────── */
.ts-nav {
  display: flex; align-items: center; list-style: none;
  gap: 2px; flex: 1;
  position: relative; /* glider positioned relative to nav ul */
}

.ts-nav-glider {
  position: absolute;
  bottom: 3px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(208,2,27,0.75), 0 0 2px rgba(208,2,27,0.5);
  pointer-events: none;
  opacity: 0;
  transition: left  0.38s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
}
.ts-nav-glider.ts-glider-visible { opacity: 1; }

.ts-nav .nav-link {
  font-family: 'Sora', sans-serif; font-size: 15.5px; font-weight: 700;
  color: #f5f5f5 !important; padding: 9px 15px; border-radius: 8px;
  white-space: nowrap; text-decoration: none; position: relative;
  transition: color 0.18s, background 0.18s, font-size 0.35s, padding 0.35s;
  letter-spacing: 0.1px;
}
.ts-nav .nav-link::after  { display: none !important; }
.ts-nav .nav-link::before { display: none !important; }

.ts-nav .nav-link:hover,
.ts-nav .nav-link.ts-active { color: var(--red) !important; background: rgba(208,2,27,0.18); }

.ts-nav .dropdown-toggle::after {
  display: inline-block !important; width: 0; height: 0; margin-left: 5px;
  border-top: 4px solid currentColor; border-right: 4px solid transparent;
  border-left: 4px solid transparent; vertical-align: middle;
}

.ts-nav .dropdown-menu {
  border: 1px solid rgba(208,2,27,0.35); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  background: rgba(18,18,24,0.96);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  padding: 8px; min-width: 240px; margin-top: 10px !important;
}
.ts-nav .dropdown-item {
  font-family: 'Sora', sans-serif; font-size: 14.5px; font-weight: 500; color: #eaeaea;
  border-radius: 8px; padding: 10px 16px; transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 9px;
}
.ts-nav .dropdown-item i { font-size: 12px; width: 16px; text-align: center; color: #aaa; transition: color 0.15s; }
.ts-nav .dropdown-item:hover,
.ts-nav .dropdown-item:focus { background: var(--red); color: #fff; }
.ts-nav .dropdown-item:hover i,
.ts-nav .dropdown-item:focus i { color: rgba(255,255,255,0.85); }
.ts-nav .dropdown-divider { margin: 3px 0; border-color: rgba(255,255,255,0.1); }
.ts-nav .dropdown { position: relative; }
.ts-nav .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 9999; }

.ts-header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.ts-icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 9px; color: #f0f0f0; font-size: 17px;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.ts-icon-link:hover { background: var(--red); color: #fff; }
.ts-vbar { width: 1px; height: 22px; background: rgba(255,255,255,0.25); margin: 0 4px; }

.btn-ts {
  font-family: 'Sora', sans-serif; font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase; padding: 9px 22px;
  border-radius: 50px; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; line-height: 1;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s, font-size 0.35s, padding 0.35s;
  white-space: nowrap;
}
.btn-ts:hover { transform: translateY(-1px); text-decoration: none; }
.btn-ts:active { transform: translateY(0); }
.btn-ts-red   { background: transparent; color: #fff; border: 2px solid var(--red); }
.btn-ts-red:hover { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(208,2,27,0.45); }
.btn-ts-black { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-ts-black:hover { background: #fff; color: var(--black); box-shadow: 0 4px 14px rgba(255,255,255,0.2); }

.ts-toggler {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px; width: 40px; height: 40px;
  background: rgba(20,20,26,0.7); border: 1px solid rgba(208,2,27,0.4);
  border-radius: 9px; cursor: pointer; backdrop-filter: blur(8px);
}
.ts-toggler span { display: block; width: 20px; height: 2px; background: #f0f0f0; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }

#ts-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.60); z-index: 1040; backdrop-filter: blur(5px); }
#ts-overlay.ts-show { display: block; }
#ts-drawer {
  position: fixed; top: 0; left: 0; width: 290px; height: 100dvh;
  background: rgba(13,13,18,0.96);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(208,2,27,0.4); box-shadow: 6px 0 40px rgba(0,0,0,0.5);
  z-index: 1050; transform: translateX(-100%);
  transition: transform 0.30s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto; padding: 1.4rem 1.4rem 2.5rem;
}
#ts-drawer.ts-show { transform: translateX(0); }
.ts-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.ts-drawer-head img { height: 100px; }
.ts-drawer-close { background: none; border: none; font-size: 17px; cursor: pointer; color: #ccc; padding: 6px; border-radius: 7px; transition: background 0.15s, color 0.15s; }
.ts-drawer-close:hover { background: var(--red-soft); color: var(--red); }
.ts-drawer-nav { list-style: none; }
.ts-drawer-nav > li { border-bottom: 1px solid rgba(255,255,255,0.08); }
.ts-drawer-nav > li > a { display: flex; align-items: center; justify-content: space-between; font-family: 'Sora', sans-serif; font-size: 13.5px; font-weight: 600; color: #f0f0f0; padding: 12px 6px; text-decoration: none; transition: color 0.15s; }
.ts-drawer-nav > li > a:hover { color: var(--red); }
.ts-drawer-nav > li > a .ts-caret { font-size: 10px; opacity: 0.6; transition: transform 0.2s; }
.ts-drawer-nav > li > a.ts-open .ts-caret { transform: rotate(180deg); }
.ts-drawer-sub { list-style: none; padding: 0 0 8px 16px; display: none; }
.ts-drawer-sub.ts-open { display: block; }
.ts-drawer-sub li a { display: flex; align-items: center; gap: 8px; font-family: 'DM Sans', sans-serif; font-size: 12.5px; color: #cccccc; padding: 8px 10px; text-decoration: none; border-left: 2px solid rgba(208,2,27,0.5); transition: color 0.15s, border-color 0.15s; }
.ts-drawer-sub li a i { font-size: 11px; width: 14px; text-align: center; color: #aaa; }
.ts-drawer-sub li a:hover { color: var(--red); border-color: var(--red); }
.ts-drawer-sub li a:hover i { color: var(--red); }
.ts-drawer-social { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.1); }
.ts-drawer-social-icons { display: flex; gap: 10px; margin-bottom: 12px; }
.ts-drawer-social-icons .ts-icon-link { width: 44px; height: 44px; font-size: 18px; border: 1px solid rgba(255,255,255,0.2); color: #f0f0f0; }
.ts-drawer-social-btns { display: flex; flex-direction: column; gap: 10px; }
.ts-drawer-social-btns .btn-ts { justify-content: center; font-size: 14px; padding: 12px 20px; }

.ts-dropdown { position: relative; }
.ts-drop-toggle .ts-caret-d { font-size: 9px; margin-left: 3px; opacity: 0.7; transition: transform 0.2s; display: inline-block; }
.ts-drop-toggle.ts-open .ts-caret-d { transform: rotate(180deg); }
.ts-dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 9999; list-style: none; padding: 8px; margin: 0; min-width: 240px; border: 1px solid rgba(208,2,27,0.4); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,0.5); background: rgba(20,20,28,0.98); backdrop-filter: blur(20px); }
.ts-dropdown-menu.ts-open { display: block; }
.ts-dropdown-menu li a { display: flex; align-items: center; gap: 9px; font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 500; color: #eeeeee; padding: 10px 14px; border-radius: 8px; text-decoration: none; transition: background 0.15s, color 0.15s; }
.ts-dropdown-menu li a i { font-size: 12px; width: 16px; text-align: center; color: #aaa; transition: color 0.15s; }
.ts-dropdown-menu li a:hover { background: #D0021B; color: #fff; }
.ts-dropdown-menu li a:hover i { color: rgba(255,255,255,0.85); }

@media (max-width: 991.98px) {
  .ts-right-col  { display: none !important; }
  .ts-toggler    { display: flex !important; }
  .ts-header-inner { justify-content: space-between; padding: 0 1.2rem; height: 72px; }
  #ts-header     { height: 72px; }
  .ts-logo img   { height: 120px; }
  .ts-drawer-nav > li > a { font-size: 16px; padding: 14px 8px; }
  .ts-drawer-sub li a { font-size: 14px; padding: 10px 14px; }
  .ts-drawer-nav > li > a .ts-caret { font-size: 12px; }
  .ts-nav-glider { display: none; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .ts-nav .nav-link { font-size: 14px; padding: 8px 10px; }
  .btn-ts           { font-size: 12.5px; padding: 8px 16px; }
}

/* Connecting line from Home to active link */
.ts-nav-connecting-line {
  position: absolute;
  bottom: 3px;
  height: 2px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(208,2,27,0.75);
  pointer-events: none;
  transition: left 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  left: 0;
  width: 0;
}