/* ========================================
   Montor Header Styles - Updated to Match Design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&family=Pacifico&display=swap');

.montor-header {
  width: 100%;
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent !important;
  padding: 20px 0;
  box-shadow: none;
  border-bottom: none;
  transition: all 0.3s ease;
}

/* Scrolled State */
.montor-header.scrolled {
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Body padding compensation */
body.has-montor-header {
  padding-top: 80px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  gap: 48px;
}

/* Logo Styles */
.header-logo {
  flex-shrink: 0;
}

.header-logo a {
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.header-logo a:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

.logo-image {
  height: auto;
  width: 140px;
  max-width: 100%;
  display: block;
  transition: all 0.3s ease;
}

.logo-text {
  font-family: 'Pacifico', cursive;
  font-size: 28px;
  font-weight: 400;
  color: #019EB2;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.logo-text:hover {
  opacity: 0.9;
}

/* Logo size when scrolled */
.montor-header.scrolled .logo-image {
  width: 130px;
}

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

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

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

.menu-item a {
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
  display: inline-block;
  padding: 6px 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #666666;
  letter-spacing: 0;
}

.menu-item a:hover {
  color: #019EB2;
}

.menu-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #019EB2;
  transition: width 0.2s ease;
  border-radius: 1px;
}

.menu-item a:hover::after,
.menu-item a.active::after {
  width: 100%;
}

.menu-item a.active {
  color: #019EB2;
  font-weight: 400;
}

/* CTA Button Styles */
.header-cta {
  flex-shrink: 0;
}

/* Hide mobile CTA on desktop */
.header-nav .header-cta {
  display: none;
}

/* Show desktop CTA */
.header-cta-desktop {
  display: block;
}

.cta-button {
  display: inline-block;
  text-decoration: none;
  padding: 12px 28px;
  background: #023047;
  color: #ffffff !important;
  border-radius: 6px;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
  box-shadow: none;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 48, 71, 0.2);
  background: #034663;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10001;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(1, 158, 178, 0.1);
}

.hamburger {
  display: block;
  width: 26px;
  height: 2px;
  background-color: #023047;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 2px;
  background-color: #023047;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 2px;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.mobile-menu-toggle.active .hamburger {
  background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
  background-color: #ffffff;
}

.mobile-menu-toggle.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
  background-color: #ffffff;
}

/* ========================================
   RESPONSIVE STYLES - REDESIGNED
   ======================================== */

/* Tablet Landscape */
@media (max-width: 1200px) {
  .header-container {
    gap: 32px;
    padding: 0 24px;
  }

  .menu-list {
    gap: 24px;
  }

  .menu-item a {
    font-size: 14px;
  }
}

/* Tablet Portrait */
@media (max-width: 1024px) {
  .header-container {
    gap: 20px;
    padding: 0 20px;
  }

  .menu-list {
    gap: 20px;
  }

  .menu-item a {
    font-size: 14px;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 12px;
  }
}

/* Mobile - COMPLETELY REDESIGNED */
@media (max-width: 768px) {

  /* Header adjustments */
  .montor-header {
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  .montor-header.scrolled {
    padding: 12px 0;
  }

  .header-container {
    padding: 0 20px;
    gap: 16px;
  }

  /* Logo */
  .logo-image {
    width: 110px;
  }

  .montor-header.scrolled .logo-image {
    width: 100px;
  }

  /* Mobile Menu Toggle Button */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(1, 158, 178, 0.08);
    transition: all 0.3s ease;
  }

  .mobile-menu-toggle:hover {
    background: rgba(1, 158, 178, 0.15);
  }

  .mobile-menu-toggle:active {
    transform: scale(0.95);
  }

  /* Hamburger Icon */
  .hamburger {
    width: 22px;
    height: 2px;
    background-color: #023047;
    border-radius: 2px;
  }

  .hamburger::before,
  .hamburger::after {
    width: 22px;
    height: 2px;
  }

  .hamburger::before {
    top: -7px;
  }

  .hamburger::after {
    bottom: -7px;
  }

  /* Active state - X icon */
  .mobile-menu-toggle.active {
    background: rgba(1, 158, 178, 0.15);
  }

  .mobile-menu-toggle.active .hamburger {
    background-color: transparent;
  }

  .mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
    background-color: #023047;
  }

  .mobile-menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
    background-color: #023047;
  }

  /* Mobile Navigation Menu */
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 0 40px;
    overflow-y: auto;
    z-index: 10001; /* Higher than overlay */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    pointer-events: none; /* No clicks when closed */
  }

  .header-nav.active {
    right: 0;
    pointer-events: auto; /* Allow clicks when open */
  }

  /* Menu List */
  .menu-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 24px;
    width: 100%;
  }

  /* Menu Items */
  .menu-item {
    width: 100%;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .menu-item:last-child {
    border-bottom: none;
  }

  /* Stagger animation */
  .header-nav.active .menu-item {
    opacity: 1;
    transform: translateX(0);
  }

  .header-nav.active .menu-item:nth-child(1) { transition-delay: 0.05s; }
  .header-nav.active .menu-item:nth-child(2) { transition-delay: 0.1s; }
  .header-nav.active .menu-item:nth-child(3) { transition-delay: 0.15s; }
  .header-nav.active .menu-item:nth-child(4) { transition-delay: 0.2s; }
  .header-nav.active .menu-item:nth-child(5) { transition-delay: 0.25s; }

  /* Menu Links */
  .menu-item a {
    display: block !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    letter-spacing: 0.2px;
    transition: all 0.3s ease !important;
    position: relative;
    background: transparent !important;
    border-radius: 0 !important;
  }

  .menu-item a::after {
    display: none !important;
  }

  /* Active & Hover States */
  .menu-item a.active {
    color: #019EB2 !important;
    background: rgba(1, 158, 178, 0.06) !important;
  }

  .menu-item a:hover {
    color: #019EB2 !important;
    background: rgba(1, 158, 178, 0.04) !important;
    padding-left: 24px !important;
  }

  /* Active indicator */
  .menu-item a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #019EB2;
    border-radius: 0 4px 4px 0;
  }

  /* Hide desktop CTA */
  .header-cta-desktop {
    display: none !important;
  }

  /* Mobile CTA Button */
  .header-nav .header-cta {
    display: block !important;
    margin-top: 32px;
    padding: 0 24px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .header-nav.active .header-cta {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
  }

  .header-nav .cta-button {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 16px 32px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: #019EB2 !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(1, 158, 178, 0.25) !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
  }

  .header-nav .cta-button:hover {
    background: #01b8cf !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(1, 158, 178, 0.35) !important;
  }

  .header-nav .cta-button:active {
    transform: translateY(0) !important;
  }

  /* Body padding adjustment */
  body.has-montor-header {
    padding-top: 70px;
  }
}

/* Mobile Menu Overlay - Redesigned */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 9998; /* BELOW menu (10001) */
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.montor-header {
  animation: slideDown 0.5s ease-out;
}

.menu-item {
  animation: fadeIn 0.6s ease-out;
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.15s; }
.menu-item:nth-child(3) { animation-delay: 0.2s; }
.menu-item:nth-child(4) { animation-delay: 0.25s; }
.menu-item:nth-child(5) { animation-delay: 0.3s; }

.header-cta {
  animation: fadeIn 0.6s ease-out 0.35s both;
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .header-container {
    padding: 0 16px;
  }

  .logo-image {
    width: 100px;
  }

  .montor-header.scrolled .logo-image {
    width: 90px;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }

  .header-nav {
    width: 90%;
    max-width: 100%;
    padding: 70px 0 30px;
  }

  .menu-list {
    padding: 0 20px;
  }

  .menu-item a {
    padding: 14px 16px !important;
    font-size: 15px !important;
  }

  .header-nav .header-cta {
    padding: 0 20px;
    margin-top: 24px;
  }

  .header-nav .cta-button {
    padding: 14px 28px !important;
    font-size: 13px !important;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  .logo-image {
    width: 90px;
  }

  .header-container {
    padding: 0 12px;
  }

  .menu-item a {
    font-size: 14px !important;
  }
}

/* Accessibility */
.menu-item a:focus,
.cta-button:focus,
.mobile-menu-toggle:focus {
  outline: 2px solid #019EB2;
  outline-offset: 2px;
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid #019EB2;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .montor-header,
  .header-nav,
  .menu-item,
  .menu-item a,
  .cta-button,
  .mobile-menu-toggle,
  .hamburger,
  .hamburger::before,
  .hamburger::after,
  .mobile-menu-overlay {
    animation: none !important;
    transition: none !important;
  }
}

/* Print Styles */
@media print {
  .mobile-menu-toggle {
    display: none;
  }

  .header-nav {
    position: static;
    width: auto;
    height: auto;
    box-shadow: none;
  }

  .menu-list {
    flex-direction: row;
    gap: 20px;
  }

  .menu-item {
    border-bottom: none;
  }
}
