/* =========================================================
   UNDERHOST - Modern Mobile Menu (Production CSS)
   Put this in its own file, e.g. /css/modern-mobile-menu.css
   Colors: Navy Blue Gradient + Aqua Pulse Crystal Waters
   ========================================================= */

/* Base safety - ensures consistent box-sizing across all elements */
*, *::before, *::after { box-sizing: border-box; }

/* New Modern Mobile Menu (hidden by default on desktop) */
.modern-mobile-menu { display: none; }

/* Modern Menu Divider - Elegant separator with gradient lines and icon */
.modern-menu-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 15px 20px;
}

.modern-divider-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  margin: 0 10px;
}

.modern-divider-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #00d4ff, #0077ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 119, 255, 0.3);
}

.modern-divider-icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

/* =========================================================
   MOBILE/TABLET STYLES - Applied when screen width is 1200px or less
   ========================================================= */
@media (max-width: 1200px) {

  /* Hide old drawer menu completely on tablets and mobile */
  .drawer.drawer--right { display: none !important; }

  /* Prevent horizontal scroll/shift issues */
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Enable modern menu with high z-index to stay above other content */
  .modern-mobile-menu {
    display: block;
    position: relative;
    z-index: 99999;
    font-family: 'Montserrat', sans-serif;
  }

/* =========================================================
   MENU BAR - Ultra Deep Navy Gradient
   6 colors for richest depth
   ========================================================= */
.modern-menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;

  background: linear-gradient(135deg,
    #0a1220 0%,   /* near-black navy */
    #0f1c2f 35%,  /* deep slate blue */
    #14263f 65%,  /* controlled navy */
    #0e1a2d 100%  /* darker close */
  );

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);

  width: 100%;
  position: relative;
  z-index: 100001;
}


  /* Logo container - prevents shrinking */
  .modern-logo { flex-shrink: 0; }
  .modern-logo img {
    height: 70px;
    width: auto;
    display: block;
  }

  /* =========================================================
     HAMBURGER BUTTON - Aqua Pulse (Crystal Waters) theme
     Using gradient-horizontal colors: #00d4ff, #0077ff, #0044aa
     ========================================================= */
  .modern-hamburger-container {
    position: fixed !important;
    top: calc(15px + env(safe-area-inset-top)) !important;
    right: calc(15px + env(safe-area-inset-right)) !important;
    z-index: 2147483647 !important;
    margin: 0 !important;
  }

  /* Prevent parent transform from breaking fixed positioning */
  .modern-mobile-menu,
  .modern-menu-bar {
    transform: none !important;
    will-change: auto !important;
  }

  .modern-hamburger {
    width: 54px;
    height: 54px;
    padding: 14px;
    /* Aqua Pulse gradient: #00d4ff (bright cyan) to #0077ff to #0044aa (deep blue) */
    background: linear-gradient(-45deg, #00d4ff, #0077ff, #0044aa);
    border: none;
    border-radius: 14px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
  }

  .modern-hamburger:hover {

    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 163, 255, 0.2);
  }

  .modern-hamburger span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  /* Hamburger open state animation - transforms into X */
  .modern-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .modern-hamburger.open span:nth-child(2) { opacity: 0; }
  .modern-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Accessibility focus state */
  .modern-hamburger:focus-visible {
    outline: 3px solid #0077FF;
    outline-offset: 2px;
  }

  /* =========================================================
     OVERLAY - Darkens background when menu is open
     Using #0D1F3C (primary-darker) with opacity
     ========================================================= */
  .modern-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 31, 60, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99998;
  }
  .modern-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(8px);
    background: rgba(13, 31, 60, 0.7);
  }

  /* =========================================================
     SIDE PANEL - Sliding menu from right
     Clean white panel with blue accents
     ========================================================= */
  .modern-menu-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 40px rgba(23, 110, 165, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    overflow-y: auto;
    padding-bottom: 30px;
    scrollbar-width: thin;
    scrollbar-color: #00B6E7 #f1f5f9;
  }

  /* Custom scrollbar for WebKit browsers */
  .modern-menu-panel::-webkit-scrollbar {
    width: 4px;
  }
  .modern-menu-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
  }
  .modern-menu-panel::-webkit-scrollbar-thumb {
    background: #00B6E7;
    border-radius: 4px;
  }
  .modern-menu-panel::-webkit-scrollbar-thumb:hover {
    background: #0077FF;
  }

  .modern-menu-panel.open { right: 0; }

  /* =========================================================
     DIVIDER - Using #0077FF for brand-colored gradient
     ========================================================= */
  .modern-menu-divider {
    margin: 25px 15px 30px;
  }

  .modern-divider-line {
    height: 1px;
    background: linear-gradient(90deg, 
      transparent, 
      rgba(0, 119, 255, 0.2), 
      rgba(0, 119, 255, 0.3), 
      rgba(0, 119, 255, 0.2), 
      transparent
    );
  }

  .modern-divider-icon {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid rgba(13, 31, 60, 0.1);
    box-shadow: 0 10px 20px rgba(0, 119, 255, 0.2);
  }

  .modern-divider-icon img {
    filter: none;
    opacity: 0.9;
  }

  /* =========================================================
     HOME BUTTON - Clean card style with #0077FF accent
     ========================================================= */
  .modern-home-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    margin: 0 15px 25px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    color: #0D1F3C !important;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid rgba(13, 31, 60, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .modern-home-btn i { 
    font-size: 18px;
    color: #0077FF;
  }
  .modern-home-btn:hover {
    background: linear-gradient(145deg, #f1f5f9, #e9eef3);
    border-color: #0077FF;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 119, 255, 0.2);
    color: #0D1F3C !important;
    text-decoration: none;
  }

  /* =========================================================
     MENU SECTIONS - Using #0077FF for active states
     ========================================================= */
  .modern-menu-section {
    margin: 0 12px 12px;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
  }

  /* Section Header */
  .modern-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(13, 31, 60, 0.05);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  }
  .modern-section-header:hover {
    background: #fafbfc;
    border-color: #00B6E7;
  }
  .modern-section-header.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #0077FF;
    border-bottom-color: transparent;
    background: #f8fafc;
  }
  .modern-section-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #0D1F3C;
    text-transform: uppercase;
  }
  .modern-section-header i {
    color: #0077FF;
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .modern-section-header.active i { transform: rotate(180deg); }

  /* Section Content */
  .modern-section-content {
    display: none;
    background: white;
    border: 1px solid rgba(13, 31, 60, 0.1);
    border-top: none;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    padding: 8px 0;
  }
  .modern-section-content.show { display: block; }

  /* Menu Links */
  .modern-section-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px 14px 40px;
    color: #1F2937;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 3px solid transparent;
  }
  
  /* Arrow indicator */
  .modern-section-content a::before {
    content: '→';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    color: #0077FF;
    font-size: 12px;
    transition: all 0.25s ease;
  }
  
  .modern-section-content a:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    color: #0077FF;
    padding-left: 48px;
    border-left-color: #0077FF;
  }
  
  .modern-section-content a:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  /* Accessibility focus state */
  .modern-section-content a:focus-visible {
    outline: 2px solid #0077FF;
    outline-offset: -2px;
    background: #f8fafc;
  }

  /* =========================================================
     LANGUAGE SELECTOR
     ========================================================= */
  .modern-language {
    margin: 30px 15px 20px;
    padding: 20px 0 0;
    border-top: 1px solid rgba(13, 31, 60, 0.1);
    text-align: center;
  }
  .modern-language h5 {
    font-size: 13px;
    color: #334155;
    margin-bottom: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }
  .modern-language-flags {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .modern-language-flags a {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  }
  .modern-language-flags a:hover { 
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 119, 255, 0.2);
  }
  .modern-language-flags img {
    width: 36px;
    height: 27px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover;
  }

  /* =========================================================
     NOC STATUS - Using #176EA5 for text
     ========================================================= */
  .modern-noc-status {
    margin: 20px 15px 30px;
    padding: 14px 18px;
    background: linear-gradient(145deg, rgba(0, 182, 231, 0.1), rgba(0, 119, 255, 0.05));
    border: 1px solid rgba(13, 31, 60, 0.1);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .modern-noc-status span {
    font-size: 14px;
    color: #176EA5;
    font-weight: 500;
  }
  .modern-noc-status .status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    animation: pulse 2s infinite;
  }

  /* Pulse animation for status dot */
  @keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
  }
}

/* =========================================================
   GLOBAL STYLES - Remove old drawer styles completely
   ========================================================= */

.mobileogo {
  display: none !important;
}

/* Adjust visibility breakpoints */
@media (max-width: 1200px) {
  /* Hide desktop menu on screens 1200px and below */
  .visible-lg {
    display: none !important;
  }
  
  /* Ensure mobile menu shows */
  .modern-mobile-menu {
    display: block !important;
  }
}

@media (min-width: 1201px) {
  /* Show desktop menu on screens 1201px and above */
  .visible-lg {
    display: block !important;
  }
  
  /* Hide mobile menu on larger screens */
  .modern-mobile-menu {
    display: none !important;
  }
}


  /* Modern Animated Chat Widget - UnderHost Colors */
  .uh-chat-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483000;
    background: #0091d6;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 145, 214, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease, background 0.2s;
    animation: fab-pulse 3s infinite ease-in-out;
  }

  .uh-chat-fab:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 145, 214, 0.4);
    background: #0082c4;
  }

  .uh-chat-fab i {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.2s;
  }

  .uh-chat-fab:hover i {
    transform: rotate(5deg) scale(1.05);
  }

  @keyframes fab-pulse {
    0% { box-shadow: 0 8px 20px rgba(0,145,214,0.4); }
    50% { box-shadow: 0 16px 32px rgba(0,145,214,0.7), 0 0 0 4px rgba(0,145,214,0.1); }
    100% { box-shadow: 0 8px 20px rgba(0,145,214,0.4); }
  }

  .uh-chat-widget {
    position: fixed;
    right: 18px;
    bottom: 86px;
    width: 750px;
    max-width: calc(100vw - 36px);
    height: 800px;
    min-height: 700px;
    max-height: 85vh;
    display: none;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    z-index: 2147483001;
    background: #fafafa;
    box-shadow: 0 25px 60px rgba(0, 30, 60, 0.25), 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #c5c5c5;
    animation: widget-rise 0.35s cubic-bezier(0.21, 0.98, 0.35, 1) forwards;
    transform-origin: bottom right;
    font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, sans-serif;
  }

  @keyframes widget-rise {
    0% { opacity: 0; transform: scale(0.9) translateY(15px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
  }

  .uh-chat-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: #0091d6;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
  }

  .uh-chat-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
  }

  .uh-chat-header h3 i {
    font-size: 16px;
  }

  .uh-chat-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(2px);
  }

  .uh-chat-close {
    background: transparent;
    border: 0;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .uh-chat-close:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
    transform: rotate(180deg);
  }

  #uhChatFrameMount {
    flex: 1;
    position: relative;
    background: #fafafa;
    height: calc(100% - 60px);
    min-height: 0;
  }

  .uh-chat-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fafafa;
    display: block;
  }

  .uh-chat-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .uh-chat-loader.hidden {
    opacity: 0;
  }

  .loader-dots {
    display: flex;
    gap: 8px;
  }

  .loader-dots div {
    width: 12px;
    height: 12px;
    background: #0091d6;
    border-radius: 50%;
    opacity: 0.6;
    animation: dot-wave 1s infinite alternate ease-in-out;
  }

  .loader-dots div:nth-child(2) {
    animation-delay: 0.2s;
    background: #2768db;
  }

  .loader-dots div:nth-child(3) {
    animation-delay: 0.4s;
    background: #0091d6;
  }

  @keyframes dot-wave {
    0% { transform: translateY(0); opacity: 0.3; }
    100% { transform: translateY(-12px); opacity: 1; }
  }

  @media (max-width: 520px) {
    .uh-chat-widget {
      right: 10px;
      left: 10px;
      width: auto;
      height: 700px;
      min-height: 500px;
      max-height: 80vh;
      bottom: 78px;
      border-radius: 10px;
    }
    
    .uh-chat-fab {
      right: 12px;
      bottom: 12px;
    }
    
    .uh-chat-header {
      height: 55px;
    }
    
    #uhChatFrameMount {
      height: calc(100% - 55px);
    }
  }
