* {
  margin: 0;
  padding: 0;
}
/* ///////// */
.navbar-container {
    position: fixed;
    max-width: 2000px;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    transition: background-color 0.3s ease; 
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    border-radius: 15px;
}



.navbar-container.scrolled .main-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid #211835;
}

.top-header {
    color: white;
    text-align: end;
    padding: 2px 20px;
    background: linear-gradient(135deg, rgb(42 31 65 / 83%), rgba(76, 29, 149, 0.5), rgb(172 104 172));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    position: relative;
    overflow: hidden;
    border: 0;
}

.email-phone{
    display: flex;
    align-items: center;
    justify-content: end;
}

/* خطوط نورونی */
.neural-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.neural-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    opacity: 0;
}

.line-1 { top: 25%; width: 40%; }
.line-2 { top: 50%; width: 60%; left: 20%; }
.line-3 { top: 75%; width: 30%; left: 60%; }
.line-4 { top: 90%; width: 50%; left: 10%; }

/* نقاط متحرک */
.neural-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.neural-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    opacity: 0;
}

.dot-1 { top: 20%; left: 10%; }
.dot-2 { top: 40%; left: 80%; }
.dot-3 { top: 60%; left: 30%; }
.dot-4 { top: 80%; left: 70%; }


/* Main Header */
.main-header {
    background: #211835;
    /* width: 100%; */
    /* max-width: 2000px; */
    backdrop-filter: blur(10px);
    border-bottom: 0.5px solid #ba98f3;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom-right-radius: 15px;
    border-bottom-left-radius: 15px;
    padding: 0 20px;
    }

.header-content {
  /* max-width: 1200px; */
  margin: 0 auto;
  /* padding: 0 20px; */
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  width: 100%;
}

/* Logo */
.logo img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  position: relative;
  transition: all 0.3s ease;
  font-size: 16px;
}

.nav-link:hover {
  color: #ba98f3;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ba98f3, #667eea);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.navbar-container.scrolled .nav-link {
    color: #333;
}

/* Desktop Search */
.desktop-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(186, 152, 243, 0.3);
  border-radius: 25px;
  padding: 5px;
  transition: all 0.3s ease;
  width: 300px;
}

.navbar-container.scrolled .desktop-search {
    background: rgba(33, 24, 53, 0.1);
    border: 2px solid rgba(33, 24, 53, 0.3);
}

.desktop-search:focus-within {
  border-color: #ba98f3;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(186, 152, 243, 0.2);
}

.search-input {
  background: none;
  border: none;
  color: white;
  padding: 10px 15px;
  font-size: 14px;
  width: 100%;
  outline: none;
  direction: rtl;
}

.navbar-container.scrolled .search-input {
    color: #333;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.navbar-container.scrolled .search-input::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

.search-btn {
  background: linear-gradient(135deg, #ba98f3, #667eea);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-container.scrolled .search-btn {
    background: linear-gradient(135deg, #211835, #6d28d9);
}

.search-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(186, 152, 243, 0.4);
}

/* Mobile Controls */
.mobile-controls {
  display: none;
  gap: 15px;
  align-items: center;
}

.mobile-search-btn,
.mobile-menu-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(186, 152, 243, 0.3);
  border-radius: 10px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-container.scrolled .mobile-search-btn,
.navbar-container.scrolled .mobile-menu-btn {
    background: rgba(33, 24, 53, 0.1);
    border: 2px solid rgba(33, 24, 53, 0.3);
    color: #333;
}

.mobile-search-btn:hover,
.mobile-menu-btn:hover {
  background: rgba(186, 152, 243, 0.2);
  border-color: #ba98f3;
  transform: translateY(-2px);
}

/* Hamburger Animation */
.mobile-menu-btn {
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.navbar-container.scrolled .hamburger-line {
    background: #333;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  background: rgba(0, 9, 25, 0.95); /* پس زمینه تیره شفاف */
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center; /* عمودی وسط */
  justify-content: center; /* افقی وسط */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

}

.mobile-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-search-content {
  width: 90%;
  max-width: 500px;
  position: relative;
  transform: translateY(-50px); /* انیمیشن ورود از پایین */
  transition: transform 0.3s ease;
}

.mobile-search-overlay.active .mobile-search-content {
  transform: translateY(0); /* بازگشت به موقعیت اصلی */
}

.mobile-search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #ba98f3;
  border-radius: 15px;
  padding: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.mobile-search-input {
  background: none;
  border: none;
  color: white;
  padding: 15px 20px;
  font-size: 18px;
  width: 100%;
  outline: none;
  direction: rtl;
}

.mobile-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.mobile-search-submit {
  background: linear-gradient(135deg, #ba98f3, #667eea);
  border: none;
  border-radius: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-search-close {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  margin: 0 auto;
  transition: all 0.3s ease;
  position: absolute;
  bottom: -80px; /* موقعیت دکمه بستن */
  left: 50%;
  transform: translateX(-50%);
}

.mobile-search-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%) rotate(90deg);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    display: none;
}

.mobile-sidebar.active {
    display: block;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-sidebar.active .sidebar-overlay {
  opacity: 1; 
}

.sidebar-content {
    position: absolute;
    right: -100%;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: linear-gradient(135deg, rgba(0, 9, 25, 0.95) 0%, rgba(26, 35, 50, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-left: 2px solid #ba98f3;
    transition: right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    z-index: 1501;
}

.mobile-sidebar.active .sidebar-content {
    right: 0;
}

.sidebar-header {
  padding: 30px 25px 20px;
  border-bottom: 1px solid rgba(186, 152, 243, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  height: 40px;
  width: auto;
}

.sidebar-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.sidebar-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 15px 25px;
  font-size: 18px;
  font-weight: 500;
  border-right: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-link::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(186, 152, 243, 0.1), transparent);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.sidebar-link:hover::before {
  transform: translateX(0);
}

.sidebar-link:hover {
  color: #ba98f3;
  border-right-color: #ba98f3;
  padding-right: 35px;
}

.sidebar-footer {
  padding: 20px 25px 30px;
  border-top: 1px solid rgba(186, 152, 243, 0.3);
}

.sidebar-footer .contact-info {
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.sidebar-footer .contact-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .top-header {
    display: none;
  }

  .desktop-nav,
  .desktop-search {
    display: none;
  }

  .mobile-controls {
    display: flex;
  }

  .header-content {
    /* padding: 0 15px; */
    height: 60px;
  }
}

@media (max-width: 480px) {

    .logo img {
    height: 40px;
  }

  .main-header{
    /* padding: 0; */
  }

    .top-header{
  display: none;
}

  .sidebar-content {
    width: 100%;
    max-width: none;
  }

  .mobile-search-content {
    width: 95%;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-in-right {
  animation: slideInRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Focus styles for accessibility */
.mobile-search-btn:focus,
.mobile-menu-btn:focus,
.sidebar-close:focus,
.mobile-search-close:focus {
  outline: 2px solid #ba98f3;
  outline-offset: 2px;
}

.nav-link:focus,
.sidebar-link:focus {
  outline: 2px solid #ba98f3;
  outline-offset: 4px;
}