/* ===================================
   Zao Navbar Complete Styles
   All original functionality preserved
   =================================== */

/* ===================================
   CSS Variables
   =================================== */
:root {
  --primary-color: #8731e8;
  --white-color: #ffffff;
  --nav-item-color: #333333;
  --primary-t-color: #666666;
  --border-radius-sm: 4px;
}

/* ===================================
   Base Smooth Scrolling (from your inline styles)
   =================================== */
html {
  scroll-behavior: smooth;
}

/* Enhanced smooth scrolling for better browser support */
.smooth-anchor {
  scroll-behavior: smooth;
}

/* Offset for fixed header */
section {
  scroll-margin-top: 100px;
}

/* Active navigation state (from your inline styles) */
.navbar-nav .nav-link.active {
  color: #8731e8 !important;
  font-weight: 600;
}

#navbar-logo {
  transition: opacity 0.2s ease;
}

/* ===================================
   Header Styles (from your original CSS)
   =================================== */
header {
  position: relative;
  z-index: 5;
}

header .navbar-expand {
  position: fixed;
  top: 0;
  z-index: 2;
  width: 100%;
  padding: 20px 25px;
}

header .navbar-expand .navbar-brand {
  padding: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 0;
  color: var(--nav-item-color);
}

header .navbar-expand .navbar-brand i {
  font-size: 1.8rem;
  font-weight: bold;
  font-style: initial;
  color: var(--primary-color);
}

header .navbar-expand .navbar-nav.toggle {
  display: none;
}

header .navbar-expand .navbar-nav.toggle i {
  font-size: 20px;
}

header .navbar-expand .navbar-nav .nav-item {
  margin: 0;
}

header .navbar-expand .navbar-nav .nav-item a:not(.btn) {
  display: flex;
  align-items: center;
  padding-right: 1rem;
  padding-left: 1rem;
  font-weight: 500;
  color: var(--white-color);
  text-decoration: none;
}

header
  .navbar-expand
  .navbar-nav
  .nav-item
  .nav-link:not(.btn):not(.title):hover,
header
  .navbar-expand
  .navbar-nav
  .nav-item
  .nav-link.active:not(.btn):not(.title) {
  color: var(--primary-color);
}

header .navbar-expand .navbar-nav .dropdown .dropdown-menu {
  display: block;
  width: max-content;
  min-width: 14.375rem;
  padding: 0.625rem 0;
  border: none;
  border-radius: 2px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px);
}

header .navbar-expand .navbar-nav .dropdown .dropdown-menu::before {
  content: "";
  position: absolute !important;
  top: -10px;
  right: auto;
  bottom: auto;
  left: 10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fff;
}

header .navbar-expand .navbar-nav .dropdown .dropdown-menu .nav-link:not(.btn) {
  justify-content: space-between;
  padding: 0.625rem;
  color: var(--nav-item-color);
  font-size: 0.8125rem;
  text-transform: uppercase;
  font-weight: 700;
}

header .navbar-expand .navbar-nav .dropdown .dropdown-menu .nav-link.title {
  font-weight: 600;
  color: var(--primary-t-color);
  opacity: 0.8;
}

header
  .navbar-expand
  .navbar-nav
  .dropdown
  .dropdown-menu
  .nav-link:not(.btn):not(.title):hover {
  background-color: rgba(1, 114, 128, 0.05);
  color: var(--primary-color);
}

header .navbar-expand .navbar-nav .dropdown .dropdown-menu .dropdown-menu {
  top: -8px;
  left: 100%;
}

header
  .navbar-expand
  .navbar-nav
  .dropdown
  .dropdown-menu
  .dropdown-menu::before {
  content: none;
}

header .navbar-expand .navbar-nav .dropdown i.icon-arrow-down {
  position: relative;
  top: 1.5px;
  margin: 0 0 0 0.3rem;
  font-size: 12px;
  font-weight: 600;
}

header .navbar-expand .navbar-nav .dropdown i.icon-arrow-right {
  position: relative;
  top: 0;
  left: 5px;
  margin: 0 0 0 0.3rem;
  font-size: 10px;
  font-weight: 600;
}

header .navbar-expand .navbar-nav .dropdown:hover > .dropdown-menu {
  visibility: unset;
  opacity: 1;
  margin: 0;
  transform: translateY(0px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

header .navbar-expand .icons i {
  font-weight: 400;
}

/* ===================================
   Sticky Navbar (from your original CSS)
   =================================== */
header .navbar-sticky {
  background-color: rgba(255, 255, 255, 0.95); /* Increase opacity */
  backdrop-filter: blur(8px); /* Reduce blur amount */
  -webkit-backdrop-filter: blur(8px); /* Safari support */
  animation: 300ms ease-in-out 0s normal none 1 running fadeInDown; /* Faster animation */
  transition: all 0.2s ease; /* Add smooth transition */
}
header .navbar-sticky .navbar-nav .nav-item a:not(.btn) {
  color: var(--nav-item-color);
}

/* ===================================
   Dropdown Styles (from your original CSS)
   =================================== */
.dropdown .dropdown-menu > li {
  padding: 0 0.625rem;
}

/* ===================================
   Mobile Menu Styles (from your original CSS)
   =================================== */
.menu .items {
  margin-left: -5px;
  width: calc(100% + 10px);
}

.menu .navbar-nav {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.menu .navbar-nav .nav-item {
  margin: 0;
}

.menu .navbar-nav .nav-item .nav-link:not(.btn) {
  width: calc(100% - 12px);
  padding: 0.5rem 1rem;
  margin: 0 5px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
}

.menu .navbar-nav .nav-item .nav-link:not(.btn):hover {
  background-color: #e5e6f6;
  color: var(--primary-color);
}

.menu .navbar-nav .nav-item .nav-link:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-t-color);
}

.menu .navbar-nav .dropdown .dropdown-menu {
  display: none;
  width: 100%;
  padding: 0 0 0 10px;
  margin: 0 0 10px;
  background: none;
  border: none;
  visibility: visible;
  opacity: 1;
}

.menu .navbar-nav .dropdown .dropdown-menu.show {
  display: block;
}

.menu .navbar-nav .dropdown .dropdown-menu .nav-link {
  padding: 0.625rem;
  margin: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--nav-item-color);
  text-align: left;
  text-transform: uppercase;
  text-decoration: none;
}

.menu .navbar-nav .dropdown .dropdown-menu .nav-link:hover,
.menu .navbar-nav .dropdown .dropdown-menu .nav-link.active {
  color: var(--primary-color);
}

.menu .navbar-nav .dropdown .dropdown-menu .nav-link.title {
  font-weight: 600;
  color: var(--primary-t-color);
  border: none;
  opacity: 0.8;
}

.menu .navbar-nav .dropdown .dropdown-menu .dropdown-menu {
  position: relative;
  top: initial;
  left: initial;
}

.menu .navbar-nav .dropdown .dropdown-menu .left,
.menu .navbar-nav .dropdown .dropdown-menu .right {
  width: 50%;
}

.menu .navbar-nav .dropdown:first-child {
  margin-top: 0;
}

.menu .navbar-nav i.icon-arrow-down {
  font-size: 18px;
}

/* ===================================
   Dropdown Animations (from your original CSS)
   =================================== */
.dropdown .nav-link i {
  transition: transform 0.3s ease-in-out;
}

.rotate-arrow {
  transform: rotate(-180deg);
  transition: transform 0.3s ease-in-out;
}

.navbar-nav .dropdown-menu {
  transition:
    visibility 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.navbar-nav .show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   Modal Styles (Bootstrap Compatible)
   =================================== */
.modal {
  z-index: 1050;
}

.modal-dialog-slideout {
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.modal-content.full {
  height: 100vh;
  border: none;
  border-radius: 0;
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header i {
  margin-left: auto;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

/* ===================================
   Form Styles (for search modal)
   =================================== */
.contact-form .form-floating {
  margin-bottom: 1rem;
}

.contact-form .form-control {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.75rem;
  width: 100%;
}

.contact-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(135, 49, 232, 0.25);
  outline: 0;
}

.contact-form label {
  color: #6c757d;
}

.search-submit {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.search-submit:hover {
  background-color: #7029d1;
}

.modal-heading {
  color: #333;
  margin-bottom: 1rem;
}

/* ===================================
   Icon Styles (Custom Icons for your project)
   =================================== */
.icon-magnifier::before {
  content: "🔍";
  font-size: 16px;
}

.icon-menu::before {
  content: "☰";
  font-size: 18px;
}

.icon-close::before {
  content: "✕";
  font-size: 18px;
}

/* Alternative Font Awesome support */
.fa-search::before,
.fas.fa-search::before {
  content: "\f002";
}

.fa-bars::before,
.fas.fa-bars::before {
  content: "\f0c9";
}

.fa-times::before,
.fas.fa-times::before {
  content: "\f00d";
}

/* ===================================
   Animations (from your original CSS)
   =================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 991.98px) {
  header .navbar-expand .navbar-nav.toggle {
    display: block;
  }

  header .navbar-expand .navbar-nav.items {
    display: none;
  }
}

@media (max-width: 767.98px) {
  header .navbar-expand {
    padding: 15px 20px;
  }

  .menu .navbar-nav {
    font-size: 1.2rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  header .navbar-expand {
    padding: 10px 15px;
  }

  header .navbar-expand .navbar-brand img {
    width: 35%;
  }
}

/* ===================================
   Bootstrap Utility Classes
   =================================== */
.ms-auto {
  margin-left: auto !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.me-3 {
  margin-right: 1rem !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.p-0 {
  padding: 0 !important;
}

.w-100 {
  width: 100% !important;
}

.text-center {
  text-align: center !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

/* ===================================
   Component Specific Overrides
   =================================== */
/* Ensure navbar takes precedence over other styles */
.zao-navbar-component header {
  z-index: 1000;
}

.zao-navbar-component .navbar {
  z-index: 1001;
}

/* Prevent conflicts with other modals */
.zao-navbar-component .modal {
  z-index: 1055;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
  header,
  .modal {
    display: none !important;
  }
}

/* ===================================
   Accessibility Improvements
   =================================== */
/* .nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} */

.modal-header [data-bs-dismiss="modal"] {
  cursor: pointer;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .smooth-anchor {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --nav-item-color: #ffffff;
    --primary-t-color: #cccccc;
  }

  header .navbar-sticky {
    background-color: rgba(31, 41, 55, 0.9);
  }

  .modal-content {
    background-color: #1f2937;
    color: #ffffff;
  }

  .modal-header {
    background-color: #374151;
    border-bottom-color: #4b5563;
  }
}

/* ===================================
   High Contrast Support
   =================================== */
@media (prefers-contrast: high) {
  header .navbar-expand .navbar-nav .nav-item a:not(.btn) {
    border: 1px solid transparent;
  }

  header .navbar-expand .navbar-nav .nav-item a:not(.btn):hover {
    border-color: var(--primary-color);
  }
}

.btn-xs {
  padding: 0.5rem 1rem !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
  border-radius: 0.375rem !important;
}

.btn-xs .icon {
  font-size: 0.9rem !important;
}
