/* Header Styles */
.header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  height: var(--header-height, 80px);
  background-color: transparent;
  background: transparent;
  border-bottom: none;
  z-index: 1000;
  transition: all var(--transition-speed);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  background-color: transparent;
  background: transparent;
}

/* Glass Sections */
.glass-section {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent !important;
  background-color: transparent !important;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 155px;
  margin: 0 10px;
  flex-shrink: 0;
}

.glass-section.glass-effect {
  opacity: 1;
  transform: translateY(0);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 20px;
  box-shadow: var(--shadow-glass);
  height: 60px;
  width: 155px;
  margin: 0 5px;
  flex-shrink: 0;
}

/* Dark theme glass sections */
[data-theme="dark"] .glass-section.glass-effect {
  background: rgba(59, 53, 53, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-glass);
}

/* Logo glass section - inherits all styles from .glass-section */

/* Navigation glass section */
.nav-glass {
  flex: 1;
  justify-content: center;
}

/* Actions glass section */
.actions-glass {
  gap: 8px;
}

/* Ensure proper reset for actions glass section */
.actions-glass .header-actions {
  gap: 12px;
}

/* Ensure proper reset for availability section within glass */
.actions-glass .availability-section {
  margin-top: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .glass-section {
    height: 50px;
    width: 140px;
    margin: 0 8px;
  }
  
  .glass-section.glass-effect {
    padding: 8px 16px;
    border-radius: 6px;
    height: 50px;
    width: 140px;
    margin: 0 8px;
  }
  
  .header-container {
    gap: 5px;
    padding: 0 5px;
  }
  
  .nav-glass {
    display: none !important;
  }
  
  .actions-glass {
    gap: 5px;
    width: 180px; /* Bigger width for mobile actions */
  }
  
  .actions-glass.glass-effect {
    width: 180px; /* Ensure glass effect also has bigger width */
  }
}

@media (max-width: 480px) {
  .glass-section {
    height: 45px;
    width: 120px;
    margin: 0 6px;
  }
  
  .glass-section.glass-effect {
    padding: 6px 12px;
    border-radius: 4px;
    height: 45px;
    width: 120px;
    margin: 0 6px;
  }
  
  .header-container {
    gap: 5px;
    padding: 0 10px;
  }
  
  .actions-glass {
    gap: 5px;
    width: 160px; /* Bigger width for mobile actions on small screens */
  }
  
  .actions-glass.glass-effect {
    width: 160px; /* Ensure glass effect also has bigger width */
  }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: bold;
  font-size: 1.5rem;
  transition: color var(--transition-speed);
}

.logo:hover {
  color: var(--primary-color);
}

.logo-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

/* Responsive logo sizing */
@media (max-width: 1024px) {
  .logo-icon {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .logo-icon {
    width: 80px;
    height: 80px;
  }
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

/* Navigation within glass section */
.nav-glass .nav {
  flex: 1;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.nav-glass .nav-menu {
  width: 100%;
  justify-content: space-between;
  gap: 4px;
  padding: 0 4px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 1.8vw, 1.5rem);
  max-width: 100%;
}

/* Responsive behavior for different screen sizes */
@media (max-width: 1024px) {
  .nav-menu {
    gap: clamp(0.25rem, 1.5vw, 1.25rem);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    gap: clamp(0.25rem, 1.2vw, 1rem);
  }
}

.nav-item {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: clamp(0.2rem, 1vw, 0.5rem) clamp(0.3rem, 1.2vw, 0.7rem);
  transition: all var(--transition-speed);
  position: relative;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: clamp(0.75rem, 1.3vw, 1rem);
  overflow: hidden;
  width: 100%;
  text-align: center;
  min-width: 0;
  margin: 1px;
  height: 32px;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  transition: top 0.5s ease-out;
  z-index: -1;
  border-radius: 0;
}

/* Light mode gradient */
[data-theme="light"] .nav-link::before {
  background: linear-gradient(180deg, 
    rgba(145, 26, 30, 0.2) 0%, 
    rgba(145, 26, 30, 0.4) 20%, 
    rgba(145, 26, 30, 0.6) 40%, 
    rgba(145, 26, 30, 0.8) 60%, 
    rgba(145, 26, 30, 0.9) 100%);
}

/* Dark mode gradient */
[data-theme="dark"] .nav-link::before {
  background: linear-gradient(180deg, 
    rgba(145, 26, 30, 0.1) 0%, 
    rgba(145, 26, 30, 0.3) 20%, 
    rgba(145, 26, 30, 0.5) 40%, 
    rgba(145, 26, 30, 0.7) 60%, 
    rgba(145, 26, 30, 0.9) 100%);
}

.nav-link:hover {
  background-color: transparent;
}

/* Light mode hover - keep original text color */
[data-theme="light"] .nav-link:hover {
  color: var(--text-primary);
}

/* Dark mode hover - change to white */
[data-theme="dark"] .nav-link:hover {
  color: white;
}

.nav-link:hover::before {
  top: 0;
}

.nav-link-selected {
  color: var(--primary-color);
  background-color: rgba(145, 26, 30, 0.15);
  border: 2px solid var(--primary-color);
  font-weight: bold;
}

/* Selected nav link button style */
.nav-link-button {
  background-color: #7A1A1E;
  color: white !important;
  border: 1px solid #7A1A1E;
  font-weight: bold;
  padding: clamp(0.2rem, 1vw, 0.5rem) clamp(0.3rem, 1.2vw, 0.7rem);
  border-radius: 4px;
  transition: all var(--transition-speed);
  white-space: nowrap;
  font-size: clamp(0.75rem, 1.3vw, 1rem);
  position: relative;
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  min-width: 0;
  margin: 1px;
}

.nav-link-button:hover {
  background-color: #6B1519;
  border-color: #6B1519;
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Availability Section */
.availability-section {
  display: flex;
  align-items: center;
  border: 2px solid #a83232;
  border-radius: 0;
  padding: 0.3rem 0.6rem;
  transition: border-color 0.3s ease, color 0.3s ease;
  margin-top: 0;
  height: 40px;
  box-sizing: border-box;
  flex-direction: row;
}

/* Order via dir instead of DOM reordering on language change */
[dir="rtl"] .availability-section {
  flex-direction: row-reverse;
}

[dir="ltr"] .availability-section {
  flex-direction: row;
}

.availability-section .status-indicator {
  width: 9px;
  height: 9px;
  background-color: #28a745;
  border-radius: 50%;
  margin: 0.2rem;
  animation: fade-pulse 2s infinite;
}

.availability-section .status-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0.2rem;
}

/* Dark mode for availability section */
[data-theme="dark"] .availability-section {
  border-color: #FFFFFF;
}

[data-theme="dark"] .availability-section .status-text {
  color: #FFFFFF;
}

/* Responsive availability section sizing */
@media (max-width: 1024px) {
  .availability-section {
    padding: 0.15rem 0.4rem !important;
    border-radius: 0 !important;
    height: 36px !important;
  }
  
  .availability-section .status-indicator {
    width: 9px;
    height: 9px;
    margin: 0.25rem;
    border-radius: 50%;
  }
  
  .availability-section .status-text {
    font-size: 0.8rem;
    margin: 0.25rem;
  }
  
  .minimal-language-toggle {
    padding: 0.15rem 0.4rem !important;
    border-radius: 0 !important;
    height: 36px !important;
    min-width: 38px !important;
  }
}

@media (max-width: 768px) {
  .availability-section {
    padding: 0.1rem 0.3rem !important;
    border-radius: 0 !important;
    height: 32px !important;
  }
  
  .availability-section .status-indicator {
    width: 8px;
    height: 8px;
    margin: 0.2rem;
    border-radius: 50%;
  }
  
  .availability-section .status-text {
    font-size: 0.75rem;
    margin: 0.2rem;
  }
  
  .minimal-language-toggle {
    padding: 0.1rem 0.3rem !important;
    border-radius: 0 !important;
    height: 32px !important;
    min-width: 36px !important;
  }
}

@media (max-width: 480px) {
  .availability-section {
    padding: 0.08rem 0.25rem !important;
    border-radius: 0 !important;
    height: 28px !important;
  }
  
  .availability-section .status-indicator {
    width: 7px;
    height: 7px;
    margin: 0.2rem;
    border-radius: 50%;
  }
  
  .availability-section .status-text {
    font-size: 0.7rem;
    margin: 0.2rem;
  }
  
  .minimal-language-toggle {
    padding: 0.08rem 0.25rem !important;
    border-radius: 0 !important;
    height: 28px !important;
    min-width: 32px !important;
  }
}

@keyframes fade-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Minimal Language Toggle */
.minimal-language-toggle {
  border: 2px solid #a83232;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 0;
  color: var(--text-primary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  box-sizing: border-box;
}

.minimal-language-toggle:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Dark mode for language toggle */
[data-theme="dark"] .minimal-language-toggle {
  border-color: #FFFFFF;
  color: #FFFFFF;
}

[data-theme="dark"] .minimal-language-toggle:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.language-toggle-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: inherit;
  transition: color var(--transition-speed);
}

/* Language Switcher (Legacy - keeping for compatibility) */
.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed);
}

.language-switcher:hover {
  background-color: var(--border-color);
}

.language-flag {
  width: 20px;
  height: 15px;
  border-radius: 0;
}

.language-text {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 0;
  color: var(--text-primary);
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-speed);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(180deg);
}

/* Menu Toggle Button */
.menu-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary, #000000);
  transition: color var(--transition-speed);
  height: 40px;
  width: 40px;
}

[data-theme="dark"] .menu-toggle-btn {
  color: var(--text-primary, #FFFFFF);
}

/* No hover effects for menu toggle button */

.menu-toggle-icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto;
  stroke: currentColor;
}

/* Menu Modal */
.menu-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.menu-modal.active {
  transform: translateX(0);
}

.menu-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.menu-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-speed);
}

[data-theme="dark"] .menu-drawer {
  background-color: var(--bg-primary);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #000000;
  transition: border-color var(--transition-speed);
}

[data-theme="dark"] .menu-header {
  border-bottom-color: #6B7280;
}

.menu-close {
  padding: 0.5rem;
  background: none;
  border: none;
  color: #000000;
  cursor: pointer;
  transition: color var(--transition-speed);
}

[data-theme="dark"] .menu-close {
  color: #FFFFFF;
}

/* No hover effects for close button */

.menu-close-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  margin: 0 auto;
}

.menu-logo-container {
  display: flex;
  align-items: center;
}

.menu-logo {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

.menu-content {
  flex: 1;
  overflow-y: auto;
}

.menu-nav {
  padding: 1rem 1.5rem;
}

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

.menu-item {
  margin-bottom: 0;
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  text-align: center;
  font-size: 1.125rem;
  font-weight: bold;
  color: #000000;
  text-decoration: none;
  transition: color var(--transition-speed);
  width: 100%;
  box-sizing: border-box;
}

/* RTL Support for Persian text centering */
[dir="rtl"] .menu-link {
  text-align: center;
  direction: rtl;
  unicode-bidi: bidi-override;
}

[data-theme="dark"] .menu-link {
  color: #FFFFFF;
}

/* No hover effects - clean design */

.menu-link-selected {
  border: 2px solid #000000;
  border-radius: 0;
  padding: 0.75rem;
  margin: 0.25rem 0;
  font-weight: bold;
}

[data-theme="dark"] .menu-link-selected {
  border-color: #FFFFFF;
}

.menu-footer {
  padding: 1rem;
  border-top: 1px solid #000000;
  transition: border-color var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .menu-footer {
  border-top-color: #6B7280;
}

.menu-footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.menu-power-btn {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lamp-switch {
  width: 55px;
  height: 55px;
  background-color: #a83232;
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.3s ease;
}

.lamp-switch.off {
  background-color: #555;
  box-shadow: none;
}

[data-theme="dark"] .lamp-switch {
  background-color: #555;
  box-shadow: none;
}

[data-theme="light"] .lamp-switch {
  background-color: #a83232;
  box-shadow: none;
}

.lamp-switch svg {
  width: 22px;
  height: 22px;
  fill: white;
}

/* Force theme updates for menu */
.menu-modal.theme-update {
  animation: themeUpdate 0.1s ease-in-out;
}

@keyframes themeUpdate {
  0% { opacity: 0.99; }
  100% { opacity: 1; }
}

/* RTL Support for Menu */
[dir="rtl"] .menu-modal {
  direction: rtl;
}

[dir="rtl"] .menu-drawer {
  direction: rtl;
}

[dir="rtl"] .menu-header {
  direction: rtl;
}

[dir="rtl"] .menu-content {
  direction: rtl;
}

[dir="rtl"] .menu-nav {
  direction: rtl;
}

[dir="rtl"] .menu-list {
  direction: rtl;
}

[dir="rtl"] .menu-item {
  direction: rtl;
}

[dir="rtl"] .menu-footer {
  direction: rtl;
}

[dir="rtl"] .menu-footer-content {
  direction: rtl;
}

/* Ensure Persian text is properly centered */
[dir="rtl"] .menu-link {
  text-align: center;
  direction: rtl;
  unicode-bidi: bidi-override;
  display: flex;
  align-items: center;
  justify-content: center;
}

[dir="rtl"] .menu-close .close-icon {
  transform: scaleX(-1);
}

/* Dark Theme Support */
[data-theme="dark"] .menu-modal {
  background-color: var(--bg-primary);
}

[data-theme="dark"] .menu-header {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .menu-close {
  color: var(--text-primary);
}

[data-theme="dark"] .menu-link {
  color: var(--text-primary);
}

[data-theme="dark"] .menu-item {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .menu-footer {
  border-top-color: var(--border-color);
}

/* Legacy Mobile Menu (keeping for compatibility) */
.mobile-menu {
  position: fixed;
  top: var(--mobile-header-height);
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transform: translateY(-100%);
  transition: transform var(--transition-speed);
  z-index: 999;
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-nav-menu {
  list-style: none;
  padding: 20px;
  margin: 0;
}

.mobile-nav-item {
  margin-bottom: 15px;
}

.mobile-nav-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: color var(--transition-speed);
}

.mobile-nav-link:hover {
  color: var(--primary-color);
}

/* RTL Specific Adjustments */
[dir="rtl"] .logo-icon {
  margin-inline-end: 0;
  margin-inline-start: 10px;
}

[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

[dir="rtl"] .language-switcher {
  flex-direction: row-reverse;
}

/* Header Scroll Effect */
.header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .header.scrolled {
  background-color: rgba(59, 53, 53, 0.95);
  box-shadow: var(--shadow-md);
} 