/* ==========================================================================
   SHIV KNOWLEDGE — PREMIUM HEADER & NAVIGATION STYLESHEET
   Clean, modern, premium spiritual knowledge platform header & mega menu
   ========================================================================== */

:root {
  --sk-brand-blue: #0b5fa5;
  --sk-brand-blue-hover: #084b84;
  --sk-brand-blue-light: #f0f7ff;
  --sk-gold: #b58038;
  --sk-gold-light: #fbf5ec;
  --sk-gold-gradient: linear-gradient(135deg, #c78f44 0%, #9f6c26 100%);
  --sk-text-dark: #1e293b;
  --sk-text-muted: #64748b;
  --sk-text-subtle: #94a3b8;
  --sk-border: #e2e8f0;
  --sk-border-light: #f1f5f9;
  --sk-bg-card: #ffffff;
  --sk-shadow-header: 0 4px 20px rgba(0, 0, 0, 0.04);
  --sk-shadow-mega: 0 25px 65px -12px rgba(15, 23, 42, 0.16), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  --sk-radius-lg: 20px;
  --sk-radius-md: 12px;
  --sk-radius-sm: 8px;
  --sk-radius-full: 9999px;
  --sk-font-main: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sk-font-serif: Georgia, 'Times New Roman', serif;
}

/* Base resets for custom header elements */
.sk-header * {
  box-sizing: border-box;
}

/* Prevent accidental horizontal scroll */
html, body {
  overflow-x: hidden;
}

/* ==========================================================================
   1. MAIN HEADER WRAPPER
   ========================================================================== */

.sk-header {
  position: relative;
  z-index: 1002;
  background: #ffffff;
  width: 100%;
  font-family: var(--sk-font-main);
}

.sk-header-bar {
  position: relative;
  background: #ffffff;
  border-bottom: 1px solid var(--sk-border-light);
  box-shadow: var(--sk-shadow-header);
  transition: all 0.3s ease;
  width: 100%;
}

/* Sticky behavior */
.sk-header.sk-is-sticky .sk-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1005;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  animation: skSlideDown 0.35s ease forwards;
}

@keyframes skSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.sk-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

/* ==========================================================================
   2. LOGO
   ========================================================================== */

.sk-logo-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sk-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.sk-logo-link:hover {
  opacity: 0.92;
}

.sk-logo-img {
  height: 48px;
  width: auto;
  max-width: 170px;
  display: block;
  object-fit: contain;
}

/* ==========================================================================
   3. DESKTOP NAVIGATION
   ========================================================================== */

.sk-desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: static;
}

.sk-nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sk-nav-item {
  position: relative;
}

.sk-nav-item.sk-has-megamenu {
  position: static;
}

.sk-nav-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--sk-text-dark);
  text-decoration: none;
  border-radius: var(--sk-radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.sk-nav-link-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sk-nav-link:hover {
  color: var(--sk-brand-blue);
  text-decoration: none;
}

.sk-nav-arrow {
  font-size: 10px;
  transition: transform 0.25s ease;
  color: var(--sk-text-muted);
}

.sk-nav-item:hover .sk-nav-arrow,
.sk-nav-item.sk-open .sk-nav-arrow {
  transform: rotate(180deg);
  color: var(--sk-brand-blue);
}

/* Active indicator underline (subtle gold line from reference) */
.sk-nav-indicator {
  display: block;
  width: 0;
  height: 2.5px;
  background: var(--sk-gold);
  border-radius: 2px;
  margin-top: 4px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sk-nav-item:hover .sk-nav-indicator,
.sk-nav-item.sk-active .sk-nav-indicator,
.sk-nav-item.sk-open .sk-nav-indicator {
  width: 28px;
}

/* ==========================================================================
   4. DESKTOP MEGA MENU
   ========================================================================== */

.sk-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  width: min(1180px, calc(100% - 64px));
  background: var(--sk-bg-card);
  border-radius: var(--sk-radius-lg);
  box-shadow: var(--sk-shadow-mega);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
  z-index: 1020;
}

/* Invisible hover bridge between trigger and mega menu */
.sk-mega-menu::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
}

.sk-has-megamenu:hover .sk-mega-menu,
.sk-has-megamenu.sk-open .sk-mega-menu,
.sk-mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(6px);
}

.sk-mega-inner {
  display: flex;
  gap: 24px;
}

/* 3-column category grid */
.sk-mega-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 16px;
}

.sk-mega-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sk-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--sk-radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.sk-mega-item:hover {
  background: var(--sk-brand-blue-light);
  text-decoration: none;
  transform: translateX(3px);
}

.sk-mega-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--sk-radius-sm);
  background: #f8fafc;
  border: 1px solid var(--sk-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sk-text-dark);
  font-size: 15px;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.sk-mega-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sk-mega-icon .sk-mega-trishul-img,
.sk-drawer-icon .sk-drawer-trishul-img {
  width: auto;
  height: 20px;
  max-width: 14px;
  object-fit: contain;
  display: block;
}

.sk-mega-item:hover .sk-mega-icon {
  background: var(--sk-brand-blue);
  border-color: var(--sk-brand-blue);
  color: #ffffff;
}

.sk-mega-item:hover .sk-mega-icon svg {
  stroke: #ffffff;
}

.sk-mega-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sk-mega-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sk-text-dark);
  line-height: 1.25;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.sk-mega-item:hover .sk-mega-title {
  color: var(--sk-brand-blue);
}

.sk-mega-desc {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--sk-text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right-side spiritual banner card */
.sk-mega-banner {
  width: 250px;
  min-width: 250px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-self: stretch;
  text-decoration: none;
  background: #fbf8f3;
  border: 1px solid rgba(181, 128, 56, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sk-mega-banner:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(181, 128, 56, 0.18);
}

.sk-mega-banner-image {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 15px;
  transition: transform 0.4s ease;
}

.sk-mega-banner:hover .sk-mega-banner-image {
  transform: scale(1.02);
}

/* ==========================================================================
   5. HEADER RIGHT ACTIONS (Search & Om Badge)
   ========================================================================== */

.sk-desktop-actions,
.sk-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Rounded search bar */
.sk-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.sk-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 210px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius-full);
  padding: 0 14px 0 38px;
  transition: all 0.25s ease;
}

.sk-search-wrap:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.sk-search-wrap:focus-within {
  width: 250px;
  background: #ffffff;
  border-color: var(--sk-brand-blue);
  box-shadow: 0 0 0 3px rgba(11, 95, 165, 0.12);
}

.sk-search-icon-btn {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  color: var(--sk-text-subtle);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.sk-search-wrap:focus-within .sk-search-icon-btn {
  color: var(--sk-brand-blue);
}

.sk-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--sk-text-dark);
  font-family: inherit;
}

.sk-search-input::placeholder {
  color: var(--sk-text-subtle);
}

/* Om Sacred Emblem */
.sk-om-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--sk-radius-full);
  background: var(--sk-gold-gradient);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(181, 128, 56, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
  flex-shrink: 0;
}

.sk-om-badge:hover {
  color: #ffffff;
  text-decoration: none;
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(181, 128, 56, 0.38);
}

/* Mobile-only toggle controls */
.sk-mobile-controls {
  display: none;
  align-items: center;
  gap: 10px;
}

.sk-mobile-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--sk-radius-full);
  background: #f8fafc;
  border: 1px solid var(--sk-border);
  color: var(--sk-text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  padding: 0;
}

.sk-mobile-btn:hover {
  background: #f1f5f9;
  color: var(--sk-brand-blue);
}

/* Hamburger button */
.sk-hamburger-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--sk-radius-sm);
  background: #ffffff;
  border: 1px solid var(--sk-border);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.sk-hamburger-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.sk-hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--sk-text-dark);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* ==========================================================================
   6. MOBILE NAVIGATION DRAWER & OVERLAY
   ========================================================================== */

/* Dark backdrop */
.sk-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sk-drawer-overlay.sk-active {
  opacity: 1;
  visibility: visible;
}

/* Full-height slide-over drawer */
.sk-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 86vw);
  background: #ffffff;
  z-index: 9999;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sk-drawer.sk-active {
  transform: translateX(0);
}

/* Lock body scrolling when drawer is active */
body.sk-drawer-open {
  overflow: hidden !important;
}

/* Drawer header */
.sk-drawer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sk-border-light);
  background: #ffffff;
  flex-shrink: 0;
}

.sk-drawer-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.sk-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--sk-radius-full);
  background: #f8fafc;
  border: 1px solid var(--sk-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sk-text-dark);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.sk-drawer-close:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fecaca;
}

/* Drawer search form */
.sk-drawer-search-wrap {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--sk-border-light);
  flex-shrink: 0;
}

.sk-drawer-search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius-full);
  padding: 0 14px 0 38px;
  height: 42px;
}

.sk-drawer-search-form i {
  position: absolute;
  left: 14px;
  color: var(--sk-text-subtle);
  font-size: 14px;
}

.sk-drawer-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--sk-text-dark);
  font-family: inherit;
}

/* Drawer scrollable body */
.sk-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 30px;
}

.sk-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sk-drawer-item {
  border-bottom: 1px solid #f8fafc;
}

.sk-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  min-height: 48px;
  text-decoration: none;
  color: var(--sk-text-dark);
  transition: all 0.2s ease;
}

.sk-drawer-link:hover,
.sk-drawer-link:active {
  background: var(--sk-brand-blue-light);
  color: var(--sk-brand-blue);
  text-decoration: none;
}

.sk-drawer-link-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sk-drawer-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--sk-brand-blue);
  flex-shrink: 0;
}

.sk-drawer-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sk-drawer-label {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sk-drawer-chevron {
  font-size: 12px;
  color: var(--sk-text-subtle);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.sk-drawer-link:hover .sk-drawer-chevron {
  color: var(--sk-brand-blue);
  transform: translateX(2px);
}

/* Section divider header in drawer */
.sk-drawer-heading {
  padding: 14px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sk-text-subtle);
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Laptop screens (1024px - 1280px) */
@media (max-width: 1280px) {
  .sk-header-inner {
    padding: 0 24px;
  }
  .sk-nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }
  .sk-search-wrap {
    width: 180px;
  }
  .sk-search-wrap:focus-within {
    width: 210px;
  }
  .sk-mega-menu {
    width: calc(100% - 48px);
    padding: 20px;
  }
  .sk-mega-banner {
    width: 220px;
    min-width: 220px;
  }
}

/* Tablets and below (max 991px) */
@media (max-width: 991px) {
  .sk-header-inner {
    height: 66px;
    padding: 0 16px;
  }
  .sk-logo-img {
    height: 40px;
  }
  .sk-desktop-nav {
    display: none !important;
  }
  .sk-mega-menu {
    display: none !important;
  }
  .sk-desktop-actions,
  .sk-header-actions {
    display: none !important;
  }
  .sk-mobile-controls {
    display: flex !important;
  }
}

/* Small mobile devices (max 480px) */
@media (max-width: 480px) {
  .sk-header-inner {
    height: 62px;
    padding: 0 14px;
  }
  .sk-logo-img {
    height: 36px;
  }
  .sk-drawer {
    width: 88vw;
  }
  .sk-mobile-controls {
    gap: 8px;
  }
  .sk-mobile-btn,
  .sk-mobile-controls .sk-om-badge {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }
}

/* Micro screens down to 320px */
@media (max-width: 360px) {
  .sk-header-inner {
    padding: 0 10px;
  }
  .sk-logo-img {
    height: 30px;
    max-width: 125px;
  }
  .sk-mobile-controls {
    gap: 6px;
  }
  .sk-mobile-btn,
  .sk-mobile-controls .sk-om-badge {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }
  .sk-hamburger-btn {
    width: 34px;
    height: 34px;
  }
  .sk-hamburger-btn span {
    width: 16px;
  }
}

