/* ==============================================================================
   JEET COMPUTER EDUCATION - PUBLIC HEADER & NAVIGATION SYSTEM
   Location: Pali, Rajasthan | Tagline: Learn Today Earn Tomorrow
   Two-Level Responsive Architecture: Utility Bar + Sticky Main Navbar + Mobile Drawer
   ============================================================================== */

/* --- 1. Root Header Wrapper --- */
.jc-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dynamic Announcement Ribbon (Level 0) */
.jc-announcement-ribbon {
  background: linear-gradient(90deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
  color: #ffffff;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  overflow: hidden;
  max-height: 80px;
}

.jc-announcement-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  line-height: 1.35;
}

.jc-announcement-content i {
  color: #facc15;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Collapse announcement ribbon smoothly when scrolled */
.jc-header-wrapper.scrolled .jc-announcement-ribbon {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

/* --- 2. Top Utility Bar (Quick Access / Portals) --- */
.jc-utility-bar {
  background: #0b1329;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity, margin-top;
}

.jc-utility-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.jc-utility-left,
.jc-utility-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
  white-space: nowrap;
}

.jc-utility-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.jc-utility-item i {
  font-size: 11px;
  color: #38bdf8;
  transition: transform 0.2s ease;
}

.jc-utility-item:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.jc-utility-item:hover i {
  transform: scale(1.15);
}

.jc-utility-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
}

/* Badge in utility link */
.jc-util-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 2px;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Scroll Hide State for Utility Bar */
.jc-header-wrapper.scrolled .jc-utility-bar {
  transform: translateY(-100%);
  opacity: 0;
  margin-top: -38px;
  pointer-events: none;
}

/* --- 3. Main Sticky Navigation Bar --- */
.jc-main-navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px -2px rgba(0, 15, 50, 0.05);
  height: 70px;
  min-height: 70px;
  display: flex;
  align-items: center;
  transition: all 0.25s ease;
}

.jc-header-wrapper.scrolled .jc-main-navbar {
  box-shadow: 0 8px 30px -4px rgba(0, 15, 50, 0.12);
  border-bottom-color: rgba(203, 213, 225, 0.9);
}

.jc-navbar-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.5vw, 24px);
  box-sizing: border-box;
}

/* Brand / Logo */
.jc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.jc-brand:hover {
  opacity: 0.92;
}

.jc-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #f8fafc;
}

.jc-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jc-brand-text {
  display: flex;
  flex-direction: column;
}

.jc-brand-text h2 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(16px, 1.15vw, 19px);
  color: #0f172a;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.jc-brand-text span {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: 1px;
  white-space: nowrap;
}

/* --- 4. Main Desktop Navigation Links --- */
.jc-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
  flex-shrink: 1;
}

.jc-nav a {
  position: relative;
  color: #334155;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(13px, 0.95vw, 14.5px);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.jc-nav a:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

.jc-nav a.jc-active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  font-weight: 700;
}

.jc-nav a.jc-active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
}

/* --- 5. Controls & Actions --- */
.jc-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  flex-shrink: 0;
}

/* Language Switcher Pill */
.jc-lang-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  padding: 2px;
  gap: 2px;
}

.jc-lang-pill {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.jc-lang-pill:hover {
  color: #0f172a;
}

.jc-lang-pill.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Phone CTA */
.jc-call {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.jc-call:hover {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.05);
}

/* Action Primary Button */
.jc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1;
  border: none;
}

.jc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

/* Mobile Toggle Hamburger */
.jc-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.jc-toggle:hover {
  background: #e2e8f0;
  color: #2563eb;
}

/* --- 6. Mobile Responsive Drawer (.mobile-nav) --- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -105%;
  width: min(88vw, 360px);
  height: 100vh;
  height: 100dvh;
  background: #ffffff !important;
  box-shadow: -8px 0 35px rgba(0, 15, 50, 0.25);
  z-index: 100000 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  transform: none !important;
  visibility: visible !important;
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.mobile-nav.open {
  right: 0 !important;
}

/* Drawer Top Bar */
.mobile-nav-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mobile-nav-header .jc-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.mobile-nav-header .jc-brand-logo {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.mobile-nav-header .jc-brand-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.mobile-nav-header .jc-brand-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.mobile-nav-header .jc-brand-text h2 {
  font-family: var(--font-heading, 'Outfit', sans-serif) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mobile-nav-header .jc-brand-text span {
  font-size: 9.5px !important;
  color: #2563eb !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-top: 1px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mobile-nav-close {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 50% !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #475569 !important;
  cursor: pointer !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.mobile-nav-close:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
  transform: rotate(90deg) !important;
}

/* Drawer Scrollable Body */
.mobile-nav-body {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 14px 16px 30px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 1. Student Portal Hero Card in Drawer */
.mobile-student-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.mobile-student-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4) !important;
}

.mobile-student-card-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.mobile-student-card-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
}

.mobile-student-card-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.mobile-student-card-text strong {
  font-family: var(--font-heading, 'Outfit', sans-serif) !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mobile-student-card-text span {
  font-size: 10px !important;
  color: rgba(255, 255, 255, 0.82) !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mobile-student-card-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #ffffff !important;
  color: #1e3a8a !important;
  padding: 6px 11px !important;
  border-radius: 50px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
  line-height: 1 !important;
}

/* 2. Mobile Language Selector Box */
.mobile-lang-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.mobile-lang-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  margin-bottom: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.mobile-lang-header i {
  color: #2563eb !important;
  font-size: 12px !important;
}

.mobile-lang-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mobile-lang-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 7px 10px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  cursor: pointer !important;
  min-height: 36px !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.mobile-lang-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
}

/* Section Header Labels */
.mobile-section-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  letter-spacing: 0.6px !important;
  margin: 4px 0 0 2px !important;
  flex-shrink: 0 !important;
}

.mobile-section-header i {
  color: #2563eb !important;
  font-size: 11px !important;
}

/* Nav Links Containers */
.mobile-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mobile-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
  color: #1e293b !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
}

.mobile-link:hover,
.mobile-link.active {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.mobile-link.active {
  font-weight: 700 !important;
}

.mobile-link-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.mobile-link-left i {
  font-size: 14px !important;
  color: #2563eb !important;
  width: 18px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.mobile-link-left span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 13.5px !important;
  color: inherit !important;
}

.mobile-link-arrow {
  font-size: 10px !important;
  color: #cbd5e1 !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

.mobile-link:hover .mobile-link-arrow {
  color: #2563eb !important;
  transform: translateX(2px) !important;
}

/* Portal Style Links */
.mobile-link-portal {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  margin-bottom: 2px !important;
}

.mobile-link-portal:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

.portal-badge {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  padding: 3px 7px !important;
  border-radius: 6px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.portal-badge.green {
  background: #059669 !important;
}

.portal-badge.emerald {
  background: #10b981 !important;
}

.portal-badge.amber {
  background: #d97706 !important;
}

.portal-badge.dark {
  background: #475569 !important;
}
/* --- 7. Responsive Breakpoint Rules --- */
@media (max-width: 1200px) {
  .jc-nav a {
    font-size: 13px;
    padding: 6px 8px;
  }
  .jc-nav {
    gap: 8px;
  }
}

@media (max-width: 1080px) {
  .jc-nav {
    display: none;
  }
  .jc-toggle {
    display: inline-flex;
  }
  .jc-btn-exam {
    display: none;
  }
  .jc-utility-left .jc-utility-item:nth-child(n+5) {
    display: none;
  }
}

@media (max-width: 768px) {
  .jc-utility-bar {
    display: none !important;
  }
  .jc-main-navbar {
    height: 60px;
    min-height: 60px;
  }
  .jc-navbar-container {
    padding: 0 14px;
    gap: 10px;
  }
  .jc-brand {
    gap: 9px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }
  .jc-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .jc-brand-text {
    min-width: 0;
    overflow: hidden;
  }
  .jc-brand-text h2 {
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .jc-brand-text span {
    font-size: 9px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
  /* HIDE Portal Button from navbar in mobile view - neatly placed in Menu Drawer */
  .jc-actions .jc-btn,
  .jc-actions .jc-btn-portal {
    display: none !important;
  }
  .jc-actions {
    gap: 8px;
    flex-shrink: 0;
  }
  .jc-call {
    width: 36px;
    height: 36px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .jc-toggle {
    display: inline-flex !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    font-size: 16px;
    border-radius: 8px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .jc-lang-switcher {
    display: none !important;
  }
  .jc-navbar-container {
    padding: 0 10px;
  }
  .jc-brand {
    gap: 7px;
  }
  .jc-brand-logo {
    width: 36px;
    height: 36px;
  }
  .jc-brand-text h2 {
    font-size: 14.5px;
  }
  .jc-brand-text span {
    font-size: 8.5px;
  }
  .jc-call {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }
  .jc-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 15px;
  }
  .jc-announcement-ribbon {
    font-size: 0.76rem;
    padding: 5px 10px;
  }
}

@media (max-width: 360px) {
  .jc-brand-text h2 {
    font-size: 13px;
  }
  .jc-brand-text span {
    font-size: 8px;
  }
  .jc-brand-logo {
    width: 32px;
    height: 32px;
  }
}
