/* ===================================
   Modern Header & Navigation Styles
   Ultra-Modern Design with Glassmorphism
   =================================== */

/* ============ Modern Header Section ============ */
.modern-header {
  background: rgba(211, 222, 250, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(179, 192, 230, 0.3);
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 16px rgba(15, 36, 129, 0);
}

.modern-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(15, 36, 129, 0.12);
  border-bottom-color: rgba(179, 192, 230, 0.5);
}

.modern-navbar {
  padding: 0;
  min-height: 85px;
}

.modern-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Modern Logo ============ */
.modern-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.modern-logo:hover {
  transform: translateY(-2px);
}

.modern-logo img {
  height: 70px;
  width: auto;
  transition: all 0.3s ease;
}

.modern-header.scrolled .modern-logo img {
  height: 60px;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f2481;
  letter-spacing: -0.5px;
  display: none;
}

.logo-accent {
  background: linear-gradient(135deg, #3554d1, #0f2481);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ Desktop Navigation ============ */
.desktop-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 32px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  color: #0f2481;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link i {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, #3554d1, #0f2481);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #3554d1;
  background: rgba(53, 84, 209, 0.08);
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-link:hover i {
  transform: translateY(-2px);
}

/* ============ Navigation Actions ============ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Contact Button */
.contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: white;
  color: #0f2481;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid #0f2481;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 36, 129, 0.1);
}

.contact-btn:hover {
  color: white;
  background: linear-gradient(135deg, #0f2481, #3554d1);
  border-color: #3554d1;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 36, 129, 0.25);
}

.contact-btn i {
  font-size: 1.1em;
}

.contact-text-mobile {
  display: none;
}

/* CTA Button */
.cta-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #0f2481, #3554d1);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(15, 36, 129, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #3554d1, #0f2481);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(15, 36, 129, 0.4);
  color: white;
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn span,
.cta-btn i {
  position: relative;
  z-index: 1;
}

.cta-btn i {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.cta-btn:hover i {
  transform: rotate(90deg);
}

/* ============ Hamburger Menu Button ============ */
.hamburger-btn {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #0f2481;
  border-radius: 12px;
  cursor: pointer;
  padding: 10px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.hamburger-btn:hover {
  background: rgba(15, 36, 129, 0.1);
  transform: scale(1.05);
}

.hamburger-btn:focus {
  outline: 2px solid #3554d1;
  outline-offset: 2px;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.hamburger-line {
  display: block;
  height: 3px;
  background: #0f2481;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Hamburger Animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============ Mobile Menu Overlay ============ */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20000;
  overflow: hidden;
  /* Prevent scroll on overlay itself if not needed, content has its own scroll */
}

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

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
  box-shadow: -4px 0 24px rgba(15, 36, 129, 0.15);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 2px solid #e6eaf3;
  background: linear-gradient(135deg, #d3defa, #ffffff);
}

.mobile-menu-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f2481;
  margin: 0;
}

.close-menu {
  background: rgba(15, 36, 129, 0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-menu:hover {
  background: #0f2481;
  transform: rotate(90deg);
}

.close-menu i {
  color: #0f2481;
  font-size: 1.3em;
  transition: color 0.3s ease;
}

.close-menu:hover i {
  color: white;
}

.mobile-nav-list {
  flex: 1;
  list-style: none;
  padding: 16px 0;
  margin: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: #0f2481;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #0f2481, #3554d1);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(53, 84, 209, 0.08);
  color: #3554d1;
  padding-left: 32px;
}

.mobile-nav-link:hover::before {
  transform: scaleY(1);
}

.mobile-nav-link i {
  font-size: 1.3em;
  transition: transform 0.3s ease;
}

.mobile-nav-link:hover i {
  transform: translateX(4px);
}

.mobile-menu-footer {
  padding: 24px;
  border-top: 2px solid #e6eaf3;
  background: linear-gradient(180deg, #ffffff, #d3defa);
}

.mobile-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #0f2481, #3554d1);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(15, 36, 129, 0.3);
}

.mobile-call-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(15, 36, 129, 0.4);
  color: white;
}

.mobile-call-btn i {
  font-size: 1.2em;
}

/* ============ Mobile FAB Buttons ============ */
.mobile-contact-fab-group {
  display: none;
  flex-direction: column;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  gap: 12px;
}

.mobile-contact-fab {
  background: linear-gradient(135deg, #3554d1, #0f2481);
  color: white;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(53, 84, 209, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.mobile-contact-fab:nth-child(2) {
  animation-delay: 0.3s;
}

.mobile-contact-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(53, 84, 209, 0.5);
  color: white;
}

.mobile-contact-fab i {
  font-size: 1.8em;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ============ Accessibility ============ */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 20px;
  background: #0f2481;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10001;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 20px;
  outline: 3px solid #3554d1;
  outline-offset: 2px;
}

/* ============ Responsive Design ============ */
@media (min-width: 992px) and (max-width: 1200px) {
  .logo-text {
    display: inline;
    font-size: 1.2rem;
  }

  .nav-link {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .contact-text {
    display: none;
  }
}

@media (min-width: 1201px) {
  .logo-text {
    display: inline;
  }
}

@media (max-width: 991.98px) {

  .desktop-nav,
  .cta-btn.desktop-only {
    display: none !important;
  }

  .hamburger-btn {
    display: flex;
  }

  .modern-nav-container {
    padding: 0 16px;
  }

  .nav-actions {
    gap: 8px;
  }
}

@media (max-width: 767.98px) {
  .modern-navbar {
    min-height: 70px;
  }

  .modern-logo img {
    height: 55px;
  }

  .contact-text {
    display: none;
  }

  .contact-text-mobile {
    display: inline;
  }

  .contact-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .cta-btn {
    padding: 8px 14px;
    /* Match contact-btn padding */
    font-size: 0.85rem;
    /* Match contact-btn font size */
  }

  .cta-btn span {
    display: none;
    /* Hide text on small mobile if needed, or keep it? User said "Mobile and Find Property Right side". Let's keep it but if it overflows we might need to hide. Actually, 3 items (Call, Find, Burger) is a lot. Let's try to keep text but smaller. */
    display: inline;
  }

  @media (max-width: 450px) {
    .cta-btn span {
      display: none;
    }

    .cta-btn {
      padding: 8px;
      /* Square-ish button */
    }

    .contact-text-mobile {
      display: none;
    }
  }

  .hamburger-btn {
    width: 44px;
    height: 44px;
  }

  .hamburger-icon {
    width: 22px;
    gap: 4px;
  }

  .hamburger-line {
    height: 2.5px;
  }

  /* Show FAB Buttons on Mobile */
  .mobile-contact-fab-group {
    display: flex;
  }
}

@media (max-width: 480px) {
  .modern-logo img {
    height: 50px;
  }

  .contact-btn {
    padding: 6px 12px;
  }

  .mobile-menu-content {
    width: 90%;
  }

  .mobile-contact-fab {
    width: 52px;
    height: 52px;
  }

  .mobile-contact-fab i {
    font-size: 1.6em;
  }
}

/* Focus States for Accessibility */
.nav-link:focus,
.contact-btn:focus,
.cta-btn:focus,
.mobile-nav-link:focus,
.mobile-call-btn:focus {
  outline: 2px solid #3554d1;
  outline-offset: 2px;
}