/* ==========================================================================
   PREMIUM UNIFIED HEADER & OFFCANVAS STYLES
   ========================================================================== */

:root {
  --tp-theme-red: #e61932;
  --tp-theme-red-dark: #c5152a;
  --tp-heading-color: #1a1a1a;
  --tp-text-grey: #666;
}

#header-sticky {
  background-color: #ffffff;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#header-sticky.header-sticky {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* --- NAV ARROW & ROTATION --- */
.tp-megamenu-link .dropdown-arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.tp-megamenu:hover .tp-megamenu-link .dropdown-arrow {
  transform: rotate(180deg);
}

/* --- PREMIUM MEGA-MENU STYLES --- */
.tp-megamenu .custom-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  width: auto;
  min-width: 650px;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.tp-megamenu:hover .custom-mega-menu {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-flex {
  display: flex;
  min-height: 420px;
}

.mega-menu-sidebar {
  flex: 0 0 220px;
  background: #f8f9fa;
  padding: 25px 0;
  border-right: 1px solid #eee;
}

.pane-label-top {
  padding: 0 25px 20px 25px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 1.5px;
}

.mega-sidebar-item {
  padding: 10px 20px;
  margin: 4px 15px;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
  display: flex;
  align-items: center;
  text-transform: uppercase;
}

.mega-sidebar-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--tp-theme-red);
}

.mega-sidebar-item.active {
  background: rgba(230, 25, 50, 0.08);
  color: var(--tp-theme-red);
}

.mega-content-area {
  flex: 1;
  padding: 20px 40px 40px;
  background: #fff;
  min-width: 300px;
}

.mega-content-pane {
  display: none;
  animation: megaFadeIn 0.3s ease;
}

.mega-content-pane.active {
  display: block;
}

.mega-content-title {
  font-size: 22px;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 5px;
  text-transform: uppercase;
  text-align: left;
}

.mega-content-divider {
  border: 0;
  border-top: 2px solid #d1d1d1;
  height: 0;
  margin: 15px 0 20px;
  width: 100%;
  display: block;
}

.mega-solution-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 15px;
}

.mega-solution-grid::-webkit-scrollbar {
  width: 4px;
}

.mega-solution-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.mega-solution-grid::-webkit-scrollbar-thumb {
  background: var(--tp-theme-red);
  border-radius: 10px;
}

.mega-solution-link {
  font-size: 15px;
  font-weight: 600;
  color: #555;
  text-decoration: none !important;
  transition: all 0.2s ease;
  padding: 4px 0;
  display: flex;
  align-items: center;
}

.mega-solution-link:hover {
  color: var(--tp-theme-red);
  transform: translateX(5px);
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- OFFCANVAS STYLES --- */
.offcanvas__area {
  z-index: 100002 !important;
  overscroll-behavior: contain;
}

.offcanvas__overlay {
  position: fixed;
  inset: 0;
  background: rgba(128, 128, 128, 0.58);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 100001;
}

.offcanvas__overlay.active {
  opacity: 1;
  visibility: visible;
}

.offcanvas__close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50% !important;
  background-color: var(--tp-theme-red) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(230, 25, 50, 0.28);
}

.offcanvas__social a {
  border: none !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  margin-right: 15px !important;
}

.offcanvas__social {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1200px) {
  .tp-header-demo-btn { display: none !important; }
  .tp-header-right { 
    justify-content: flex-end !important;
    transform: none !important; /* Reset inline translateY */
  }
  .main-menu {
    transform: none !important; /* Reset inline translateY */
  }
  #header-sticky .logo {
    justify-content: flex-start !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 1199px) {
  #header-sticky .container-fluid { padding: 0 18px !important; }
  #header-sticky .logo img { 
    width: 148px !important; 
    max-height: none !important; 
    height: auto !important;
  }
  #header-sticky .row.align-items-center {
    max-height: 64px !important;
    min-height: 64px !important;
  }
}

@media (max-width: 767px) {
  .offcanvas__area { width: calc(100% - 34px) !important; }
  #header-sticky .logo img { width: 132px !important; }
  #header-sticky .container-fluid { padding: 0 14px !important; }
}
