/* ================================================
   NEW YORK CANCER & BLOOD SPECIALISTS
   Header Styles - header.css
   ================================================ */

/* CSS Variables for Header (self-contained) */
:root {
  /* Brand Colors */
  --nycbs-purple: #763d76;
  --nycbs-blue: #008dd0;
  --nycbs-light-blue: #0099e0;

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition: all 0.3s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* ================================================
   EYEBROW BAR
   ================================================ */
.eyebrow {
  background: var(--bg-light);
  padding: 10px 5%;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.eyebrow-left {
  display: flex;
  align-items: center;
}

.eyebrow-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.tagline {
  color: var(--text-secondary);
  font-weight: 500;
  font-style: italic;
  font-size: 15px;
}

.call-button {
  color: var(--nycbs-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.call-button:hover {
  color: var(--nycbs-purple);
}

.portal-link {
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.portal-link:hover {
  color: var(--nycbs-blue);
}

.portal-link i {
  color: var(--nycbs-blue);
  font-size: 16px;
}

/* ================================================
   MAIN HEADER
   ================================================ */
.main-header {
  background: var(--bg-white);
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.logo img {
  height: 60px;
}

.appointment-button {
  background: var(--nycbs-blue);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.appointment-button:hover {
  background: var(--nycbs-light-blue);
  transform: translateY(-2px);
  color: white;
}

/* ================================================
   NAVIGATION
   ================================================ */
nav.navbar {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 5%;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 40px;
  padding: 18px 0;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 16px;
  padding: 10px 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.nav-links > a::after,
.dropdown > a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--nycbs-blue);
  transition: width 0.3s ease;
}

.nav-links > a:hover,
.dropdown > a:hover {
  color: var(--nycbs-blue);
}

.nav-links > a:hover::after,
.dropdown > a:hover::after {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin-bottom: 5px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.hamburger span:last-child {
  margin-bottom: 0;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
}

/* Dropdown Menus */
.dropdown {
  position: relative;
}

.dropdown > a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown i {
  font-size: 10px;
  transition: var(--transition);
}

.dropdown:hover i {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-content::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--bg-white);
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-content a:hover {
  background: var(--bg-light);
  color: var(--nycbs-blue);
  transform: translateX(5px);
}

.dropdown-content i {
  color: var(--nycbs-blue);
  width: 20px;
  text-align: center;
  transform: rotate(0deg) !important;
}

/* Utility class that might be used */
.desktop-only {
  display: block;
}

/* ================================================
   MOBILE RESPONSIVE HEADER
   ================================================ */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .nav-links {
    display: none;
  }

  /* Hide the entire navbar on mobile since hamburger will be in header */
  nav.navbar {
    display: none;
  }

  /* Update main header to show hamburger */
  .main-header {
    position: relative;
  }

  .main-header .hamburger {
    display: flex !important;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1002;
  }

  .main-header .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin-bottom: 5px;
    border-radius: var(--radius-full);
    transition: var(--transition);
  }

  .main-header .hamburger span:last-child {
    margin-bottom: 0;
  }

  /* Mobile menu styles */
  .navbar-container {
    position: relative;
    padding: 0 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .navbar-container .hamburger {
    display: none;
  }

  /* Hamburger animation when open */
  .navbar-container.open ~ .main-header .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar-container.open ~ .main-header .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .navbar-container.open ~ .main-header .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    padding: 80px 20px 20px;
    overflow-y: auto;
    z-index: 1000;
  }

  .navbar-container.open .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(-100%);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .mobile-nav a {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .main-header {
    padding: 15px 20px;
  }

  .logo img {
    height: 45px;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    font-size: 12px;
    padding: 8px 12px;
  }

  .eyebrow-right {
    gap: 10px;
  }

  .portal-link {
    display: none;
  }
}

/* ================================================
   MOBILE MENU FIX - Add to header.css
   ================================================ */

/* Mobile Navigation Styles */
.mobile-nav {
  display: none; /* Hidden by default on all screen sizes */
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  /* Hide desktop navigation on mobile */
  nav.navbar {
    display: none !important;
  }

  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }

  /* Mobile navigation - controlled by JavaScript */
  .mobile-nav {
    /* Will be styled by JavaScript but add fallback styles */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    z-index: 1000;
    padding: 120px 20px 20px; /* More top padding to clear header */
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: none; /* Hidden by default, JS will show */
    flex-direction: column;
    gap: 0;
  }

  /* Mobile nav links */
  .mobile-nav a {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
  }

  .mobile-nav a:hover,
  .mobile-nav a:active {
    background: var(--bg-light);
    color: var(--nycbs-blue);
  }

  /* Mobile nav footer (appointment & portal buttons) */
  .mobile-nav-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
  }

  .mobile-appointment-btn,
  .mobile-portal-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px !important;
    margin: 8px 0;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-align: center;
  }

  .mobile-appointment-btn {
    background: var(--nycbs-blue);
    color: white !important;
  }

  .mobile-appointment-btn:hover {
    background: var(--nycbs-light-blue);
    color: white !important;
  }

  .mobile-portal-btn {
    background: var(--bg-light);
    color: var(--text-primary) !important;
  }

  .mobile-portal-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary) !important;
  }

  /* Dark overlay when menu is open */
  body.mobile-menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
  }

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

  /* Prevent body scroll when menu is open */
  body.mobile-menu-open {
    overflow: hidden;
  }

  /* Hamburger menu button */
  .main-header .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1003; /* Above mobile nav */
    width: 44px;
    height: 44px;
    border-radius: 8px;
    transition: background 0.3s ease;
    background: transparent;
    border: none;
  }

  .main-header .hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  /* Hamburger has subtle background when active (X state) */
  .main-header .hamburger.active {
    background: rgba(118, 61, 118, 0.05);
  }

  .main-header .hamburger.active:hover {
    background: rgba(118, 61, 118, 0.1);
  }

  .main-header .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
    position: relative;
  }

  /* Hamburger animation when active */
  .main-header .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .main-header .hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .main-header .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Ensure header and hamburger stay on top */
  .main-header {
    position: relative;
    z-index: 1002; /* Higher than mobile nav */
  }

  /* Keep hamburger always accessible */
  body.mobile-menu-open .main-header {
    position: relative;
    z-index: 1002;
  }
}

/* Desktop styles - ensure mobile nav is always hidden */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }

  .hamburger {
    display: none !important;
  }

  body.mobile-menu-open::before {
    display: none !important;
  }
}
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Wider dropdown for Care & Treatment menu (2nd dropdown, 4th item overall) */
.nav-links .dropdown:nth-of-type(2) .dropdown-content {
  min-width: 300px;
}
