/* ========== FIX: LOGO POSITIONING ========== */

/* Logo must be FIRST (left side) */
.artejc-logo {
  order: 1 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Desktop Navigation in MIDDLE */
.artejc-nav {
  order: 2 !important;
  margin-left: 2rem !important;
  flex: 1 !important;
}

/* Mobile toggle button on RIGHT */
.artejc-mobile-toggle {
  order: 3 !important;
  margin-left: auto !important;
}

/* Ensure wrapper uses flexbox properly */
.artejc-nav-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  gap: clamp(1rem, 3vw, 2rem) !important;
}

/* ========== ENHANCED RESPONSIVE HEADER CSS ========== */

.artejc-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  padding: clamp(0.75rem, 2vw, 1.5rem) 0 !important;
  transition: all 0.4s ease !important;
  z-index: 9999 !important;
  box-shadow: none !important;
}

.artejc-header::before {
  display: none;
}

/* Scrolled state */
.artejc-header.scrolled {
  background: #161f31 !important;
  backdrop-filter: blur(30px) saturate(150%) brightness(1.1) !important;
  -webkit-backdrop-filter: blur(30px) saturate(150%) brightness(1.1) !important;
  border-bottom: 2px solid #161f31 !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(99, 102, 241, 0.1) !important;
  padding: clamp(0.5rem, 1.5vw, 1rem) 0 !important;
}

/* Responsive body padding */


/* Container with responsive padding */
.artejc-header .container {
  position: relative !important;
  z-index: 1 !important;
  padding-left: clamp(1rem, 3vw, 2rem) !important;
  padding-right: clamp(1rem, 3vw, 2rem) !important;
}

/* Logo responsive sizing */
.artejc-logo {
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  transition: transform 0.3s ease !important;
  flex-shrink: 0 !important;
}

.artejc-logo:hover {
  transform: scale(1.05) !important;
}

.artejc-logo-img {
  height: clamp(24px, 4vw, 36px) !important;
  width: auto !important;
  max-width: clamp(100px, 20vw, 160px) !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
  transition: all 0.4s ease !important;
}

.artejc-header.scrolled .artejc-logo-img {
  height: clamp(28px, 4.5vw, 40px) !important;
  max-width: clamp(120px, 22vw, 180px) !important;
}

/* Desktop Navigation */
.artejc-nav {
  display: flex !important;
  align-items: center !important;
}

.artejc-menu {
  display: flex !important;
  align-items: center !important;
  gap: clamp(0.25rem, 1vw, 0.75rem) !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  flex-wrap: wrap !important;
}

.artejc-menu li {
  list-style: none !important;
  margin: 0 !important;
}

.artejc-menu a {
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  border-radius: 12px !important;
  display: block !important;
}

/* Responsive menu links */
.artejc-menu-link {
  display: inline-block !important;
  padding: clamp(0.4rem, 1.2vw, 0.75rem) clamp(0.8rem, 2vw, 1.5rem) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  font-size: clamp(0.85rem, 1.8vw, 1rem) !important;
  transition: all 0.3s ease !important;
  background: none !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  white-space: nowrap !important;
  position: relative !important;
}

/* Underline effect on hover */
.artejc-menu-link::after {
  content: '' !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, #00d4ff, transparent) !important;
  border-radius: 1px !important;
  transition: width 0.3s ease !important;
}

.artejc-menu-link:hover {
  color: #ffffff !important;
  background: none !important;
  border: none !important;
}

.artejc-menu-link:hover::after {
  width: 70% !important;
}

.artejc-header.scrolled .artejc-menu-link {
  color: rgba(255, 255, 255, 0.95) !important;
}

.artejc-header.scrolled .artejc-menu-link:hover {
  color: #ffffff !important;
  background: none !important;
  border: none !important;
}

/* Active page state */
.artejc-menu .current-menu-item .artejc-menu-link,
.artejc-menu .current_page_item .artejc-menu-link {
  color: #ffffff !important;
  background: none !important;
  border: none !important;
}

.artejc-menu .current-menu-item .artejc-menu-link::after,
.artejc-menu .current_page_item .artejc-menu-link::after {
  width: 70% !important;
  background: linear-gradient(90deg, #00d4ff, transparent) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.artejc-menu .current-menu-item .artejc-menu-link:hover,
.artejc-menu .current_page_item .artejc-menu-link:hover {
  background: none !important;
  border: none !important;
}

/* Mobile Menu Button - responsive sizing */
.artejc-mobile-toggle {
  background: rgba(99, 102, 241, 0.2) !important;
  border: 1px solid rgba(99, 102, 241, 0.4) !important;
  padding: clamp(0.5rem, 1.5vw, 0.75rem) !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  border-radius: 12px !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
  min-width: 44px !important;
  min-height: 44px !important;
}

.artejc-mobile-toggle:hover {
  background: rgba(99, 102, 241, 0.3) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3) !important;
}

/* Hamburger responsive sizing */
.artejc-hamburger {
  display: block !important;
  width: clamp(20px, 4vw, 26px) !important;
  height: clamp(16px, 3vw, 20px) !important;
  position: relative !important;
}

.artejc-hamburger span {
  display: block !important;
  width: 100% !important;
  height: clamp(1.5px, 0.5vw, 2.5px) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  margin: clamp(3px, 1vw, 4px) 0 !important;
  transition: all 0.3s ease !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 2px rgba(99, 102, 241, 0.3) !important;
}

/* ========== FIXED MOBILE MENU STYLES ========== */

/* Mobile Menu - responsive */
.artejc-mobile-menu {
  background: rgba(30, 27, 75, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  width: min(400px, 90vw) !important;
  transition: transform 0.3s ease-in-out !important;
}

/* Fix mobile menu position to start below logo */
.artejc-mobile-menu.offcanvas-end {
  top: 0 !important;
  transform: translateX(100%) !important;
}

.artejc-mobile-menu.offcanvas-end.show {
  transform: translateX(0) !important;
}

/* Ensure mobile menu content starts below header */
.artejc-mobile-menu .offcanvas-body {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin-top: clamp(60px, 15vw, 80px) !important;
  height: calc(100vh - clamp(60px, 15vw, 80px)) !important;
  overflow-y: auto !important;
}

/* Mobile navigation container */
.artejc-mobile-nav-container {
  flex: 1 !important;
  padding: clamp(1rem, 3vw, 1.5rem) !important;
  padding-bottom: 1rem !important;
}

/* Close button container - FIXED POSITION UNDER MENU */
.artejc-mobile-header {
  display: flex !important;
  justify-content: center !important;
  padding: 0.5rem clamp(1rem, 3vw, 1.5rem) 1.5rem !important;
  background: transparent !important;
  position: sticky !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 0 !important;
  border-top: none !important;
  z-index: 10 !important;
}

/* SMALLER CLOSE BUTTON - VISIBLE WHITE X */
.artejc-mobile-close {
  background: rgba(99, 102, 241, 0.3) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 10px !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  opacity: 1 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFFFFF'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
  background-size: 20px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  cursor: pointer !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.artejc-mobile-close:hover {
  background: rgba(99, 102, 241, 0.5) !important;
  border-color: rgba(255, 255, 255, 1) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5) !important;
}

.artejc-mobile-close:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
}

/* Remove Bootstrap default close button styles that might be interfering */
.btn-close-white {
  filter: none !important;
  opacity: 1 !important;
}

/* Mobile menu items styling */
.artejc-mobile-nav {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.artejc-mobile-nav li {
  margin-bottom: 0.5rem !important;
}

/* Mobile links - responsive - FIXED WHITE COLORS */
.artejc-mobile-nav a {
  display: block !important;
  padding: clamp(0.75rem, 2.5vw, 1.25rem) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  font-size: clamp(1rem, 2.5vw, 1.2rem) !important;
  transition: all 0.3s ease !important;
  border-radius: 8px !important;
  border-left: 3px solid transparent !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  text-decoration: none !important;
}

.artejc-mobile-nav a:hover {
  color: #ffffff !important;
  background: rgba(99, 102, 241, 0.2) !important;
  border-left-color: #6366f1 !important;
  transform: translateX(4px) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

/* Remove old conflicting mobile link styles */
.artejc-mobile-link {
  display: none !important;
}

/* ========== HIDE FLOATING ICONS ON MOBILE ========== */
@media (max-width: 991.98px) {
  .floating-icons,
  .floating-icon,
  .floating-element,
  .floating-particle,
  .particle,
  .floating,
  [class*="floating-"],
  [class*="-floating"],
  .neural-network-particle,
  .floating-neural,
  .neural-particle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Large screens and up */
@media (min-width: 1400px) {
  .artejc-header {
    padding: 1.75rem 0 !important;
  }
  
  .artejc-header.scrolled {
    padding: 1.25rem 0 !important;
  }
  
  .artejc-menu-link {
    font-size: 1.05rem !important;
    padding: 0.8rem 1.6rem !important;
  }
}

/* Desktop */
@media (max-width: 1399.98px) and (min-width: 992px) {
  .artejc-menu {
    gap: 0.5rem !important;
  }
  
  .artejc-menu-link {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.95rem !important;
  }
}

/* Tablet landscape */
@media (max-width: 991.98px) and (min-width: 768px) {
  .artejc-header {
    padding: 1.25rem 0 !important;
  }
  
  .artejc-header.scrolled {
    padding: 0.875rem 0 !important;
  }
  
  body {
    padding-top: 90px !important;
  }
  
  .artejc-nav {
    display: none !important;
  }
  
  .artejc-mobile-toggle {
    display: flex !important;
  }
}

/* Tablet portrait and mobile */
@media (max-width: 767.98px) {
  .artejc-header {
    padding: 1rem 0 !important;
  }
  
  .artejc-header.scrolled {
    padding: 0.75rem 0 !important;
  }
  
  body {
    padding-top: 80px !important;
  }
  
  .artejc-header .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .artejc-nav-wrapper {
    gap: 1rem !important;
  }
}

/* Small mobile */
@media (max-width: 575.98px) {
  .artejc-header {
    padding: 0.875rem 0 !important;
  }
  
  .artejc-header.scrolled {
    padding: 0.625rem 0 !important;
  }
  
  body {
    padding-top: 75px !important;
  }
  
  .artejc-header .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .artejc-mobile-menu {
    width: 95vw !important;
  }
  
  .artejc-mobile-nav-container {
    padding: 1rem !important;
    padding-bottom: 0.5rem !important;
  }
  
  .artejc-mobile-header {
    padding: 0.25rem 1rem 1rem !important;
  }
  
  .artejc-mobile-menu .offcanvas-body {
    margin-top: 60px !important;
    height: calc(100vh - 60px) !important;
  }
  
  .artejc-mobile-close {
    width: 40px !important;
    height: 40px !important;
    background-size: 18px !important;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .artejc-logo-img {
    height: 22px !important;
    max-width: 90px !important;
  }
  
  .artejc-header.scrolled .artejc-logo-img {
    height: 26px !important;
    max-width: 110px !important;
  }
  
  .artejc-mobile-toggle {
    padding: 0.5rem !important;
  }
  
  .artejc-hamburger {
    width: 18px !important;
    height: 14px !important;
  }
  
  body {
    padding-top: 70px !important;
  }
  
  .artejc-mobile-menu .offcanvas-body {
    margin-top: 50px !important;
    height: calc(100vh - 50px) !important;
  }
  
  .artejc-mobile-close {
    width: 38px !important;
    height: 38px !important;
    background-size: 16px !important;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .artejc-logo-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .artejc-header {
    padding: 0.5rem 0 !important;
  }
  
  .artejc-header.scrolled {
    padding: 0.375rem 0 !important;
  }
  
  body {
    padding-top: 60px !important;
  }
  
  .artejc-mobile-menu {
    width: 350px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  
  .artejc-mobile-menu .offcanvas-body {
    height: 90vh !important;
    margin-top: 50px !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .artejc-header,
  .artejc-logo,
  .artejc-menu-link,
  .artejc-mobile-toggle,
  .artejc-mobile-link,
  .artejc-mobile-menu {
    transition: none !important;
  }
  
  .artejc-logo:hover,
  .artejc-menu-link:hover,
  .artejc-mobile-toggle:hover,
  .artejc-mobile-close:hover {
    transform: none !important;
  }
}

/* ========== MOBILE MENU DISPLAY FIX ========== */

/* Force hide desktop navigation on mobile and tablet */
@media (max-width: 991.98px) {
  .artejc-nav,
  .artejc-nav.d-none.d-lg-flex {
    display: none !important;
    visibility: hidden !important;
  }
  
  .artejc-menu {
    display: none !important;
  }
}

/* Force show mobile toggle on smaller screens */
@media (max-width: 991.98px) {
  .artejc-mobile-toggle,
  .artejc-mobile-toggle.d-lg-none {
    display: flex !important;
    visibility: visible !important;
  }
}

/* Desktop - force hide mobile toggle */
@media (min-width: 992px) {
  .artejc-mobile-toggle,
  .artejc-mobile-toggle.d-lg-none {
    display: none !important;
    visibility: hidden !important;
  }
  
  .artejc-nav,
  .artejc-nav.d-none.d-lg-flex {
    display: flex !important;
    visibility: visible !important;
  }
}

/* Additional Bootstrap override */
.artejc-nav.d-none {
  display: none !important;
}

.artejc-nav.d-lg-flex {
  display: flex !important;
}

@media (max-width: 991.98px) {
  .artejc-nav.d-lg-flex {
    display: none !important;
  }
}

/* Mobile-specific adjustments */
@media (max-width: 767.98px) {
  .artejc-nav-wrapper {
    gap: 1rem !important;
  }
  
  .artejc-logo {
    flex: 0 !important;
  }
  
  .artejc-mobile-toggle {
    flex-shrink: 0 !important;
  }
}

/* Fix for WordPress text in mobile menu */
.artejc-mobile-menu .widgettitle,
.artejc-mobile-menu .menu-header {
    display: none !important;
}

/* Consistent hover effects for mobile and desktop */
.artejc-mobile-nav a:hover {
    color: #ffffff !important;
    background: rgba(99, 102, 241, 0.2) !important;
    border-left-color: #6366f1 !important;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

.artejc-menu-link:hover {
    color: #ffffff !important;
}

/* Blog link JavaScript helper */
@media (max-width: 991.98px) {
    .artejc-mobile-nav a[href*="#elblog"] {
        cursor: pointer;
    }
}

.artejc-mobile-title {
    display: none !important;
}

/* ========== HIDE NEURAL ICONS & NODES ON MOBILE ========== */
@media (max-width: 991.98px) {
  .floating-icons,
  .floating-icon,
  .floating-element,
  .floating-particle,
  .particle,
  .floating,
  [class*="floating-"],
  [class*="-floating"],
  .neural-network-particle,
  .floating-neural,
  .neural-particle,
  .neural-node,
  .neural-nodes,
  .neural-connection,
  .neural-connections,
  [class*="neural-node"],
  [class*="-neural-node"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}