/* Header & Navigation Styles */
.site-header.menu-above-hero,
.header {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(254, 254, 254, 0.95);
  backdrop-filter: blur(10px);
  /*border-bottom: 1px solid var(--color-border);*/
  transition: all var(--transition-normal);
}

.site-header.menu-above-hero.scrolled,
.header.scrolled {
  background-color: rgba(254, 254, 254, 0.98);
  box-shadow: var(--shadow-md);
}

.nav {
  padding: var(--spacing-md) 0;
  border-bottom: 2px solid var(--color-primary);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  min-height: 60px; /* Ensure consistent height */
}

/* Improved Logo + Site Title + Tagline Layout */
.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0; /* prevent logo area from shrinking */
}

/* Logo image styling */
.logo img,
.logo .custom-logo {
  max-height: 100px; /* Reduced from default - adjust as needed */
  width: auto;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
}

.logo:hover img,
.logo:hover .custom-logo {
  transform: scale(1.05);
}

/* Site title and tagline container */
.logo .site-branding {
  display: flex;
  flex-direction: column;
  gap: 2px; /* tight spacing between title and tagline */
  line-height: 1.2;
}

/* Site title styling */

/* Site title styling */
.logo h1 {
  font-family: var(--font-secondary);
  font-size: var(--font-size-2xl); 
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
  transition: color var(--transition-fast);
  line-height: 1.1;
}

.logo h2 {
  font-family: var(--font-secondary);
  font-size: var(--font-size-lg); 
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
  transition: color var(--transition-fast);
  line-height: 1.1;
}

/* Site tagline styling */
.logo h3 {
  font-family: var(--font-primary);
  font-size: var(--font-size-xl); 
  font-weight: var(--font-weight-normal);
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.1;
  font-style: italic;
  opacity: 0.8;
}

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

.logo:hover h3 {
  opacity: 1;
}

/* Navigation menu positioning */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl); 
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto; 
  
}




.nav-menu.my-nav li a {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
  padding: var(--spacing-sm) 0;
  transition: color var(--transition-fast);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Navigation */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--spacing-sm);
  gap: var(--spacing-xs);
}

.hamburger .bar {
  width: 24px;
  height: 3px;
  background-color: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

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

/* Top bar styling (now inside .header) */
.site-header.menu-above-hero .top-bar,
.header .top-bar {
  background-color: var(--color-primary);
  color: var(--color-primary);
  padding: var(--spacing-xs) 0; /* compact height for the utility bar */
  font-size: var(--font-size-sm);
  min-height: 35px; 
}

.site-header.menu-above-hero .top-bar a,
.site-header.menu-above-hero .top-bar a:visited,
.header.menu-above-hero .top-bar a,
.header.menu-above-hero .top-bar a:visited {
  color: var(--color-white);
}

.site-header.menu-above-hero .top-bar a:hover,
.header.menu-above-hero .top-bar a:hover {
  color: var(--color-white);
  opacity: 0.85;
}

.site-header.menu-above-hero .top-bar i,
.site-header.menu-above-hero .top-bar svg,
.header .top-bar i,
.header .top-bar svg {
  color: var(--color-white);
  fill: var(--color-white);
}

/* Arrange contact info (left) and socials (right) on one line */
.site-header.menu-above-hero .top-bar .top-bar-content,
.header .top-bar .top-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between; /* left/right split */
  gap: var(--spacing-xl);
}

.site-header.menu-above-hero .top-bar .contact-info-mini,
.header .top-bar .contact-info-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-lg); /* space between items */
}

.site-header.menu-above-hero .top-bar .contact-info-mini > span,
.site-header.menu-above-hero .top-bar .contact-info-mini a,
.header .top-bar .contact-info-mini > span,
.header .top-bar .contact-info-mini a {
  color: var(--color-primary);
}

.site-header.menu-above-hero .top-bar .contact-info-mini i,
.header .top-bar .contact-info-mini i {
  margin-right: var(--spacing-xs);
}

.site-header.menu-above-hero .top-bar .top-social-links,
.header .top-bar .top-social-links {
  margin-left: auto; /* keep to the far right */
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.site-header.menu-above-hero .top-bar .top-social-links a,
.header .top-bar .top-social-links a {
  color: var(--color-white);
  background-color: var(--color-primary);
}


@media (max-width: 1200px) {
  .nav-menu {
    gap: var(--spacing-lg);
  }
}

@media (max-width: 1280px) {


  .nav {
    padding: 0 0;
    border-bottom: none
  }
  
  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-2xl);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    min-height: 60px; /* Ensure consistent height */
  }

  .nav-menu {
    gap: var(--spacing-md);
  }
  
  /* Ensure hamburger is large and top-right for all mobile breakpoints */
  .nav-container > .hamburger {
    display: flex;
    position: fixed;
    top: -5px;
    right: 12px;
    width: 56px;
    height: 56px;
    padding: 14px; /* centers the bars */
    border-radius: var(--radius-full);
    background: rgba(var(--color-primary-rgb),1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 1600;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }
  .nav-container > .hamburger .bar { width: 28px; height: 3px; background-color: #fff; }
  
  
  .logo h3 {
    display: none; /* Hide tagline on tablets and mobile */
  }
}

/* Mobile Menu Styles */
@media (max-width: 1280px) {
  .nav-container {
    padding: 0 var(--spacing-md);
    min-height: 0; /* remove fixed header height on mobile */
  }
  

  .header {
    background-color: none;
    backdrop-filter: none;
    background: none;
  }

  /* Remove desktop nav spacing and border on mobile */
  .nav {
    padding: 0;
    border-bottom: 0;
  }

  .nav-container > .hamburger {
    display: flex;
    position: fixed;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    padding: 14px; /* centers the bars */
    border-radius: var(--radius-full);
    background: rgba(var(--color-primary-rgb),1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 1600;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }
  /* Larger, high-contrast bars on mobile */
  .nav-container > .hamburger .bar { width: 28px; height: 3px; background-color: #fff; }
  
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transform: none;
    transition: none;
    will-change: transform;
    z-index: 2000;
    border-top: 1px solid var(--color-border);
  }
  
  .nav-menu.active {
    top: 0;
  }
  
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-menu li:last-child {
    border-bottom: none;
  }

  /* Match overlay mobile menu item look */
  .nav-menu a {
    color: var(--color-text);
    display: block;
    padding: var(--spacing-lg) 0;
    font-size: var(--font-size-lg);
    text-align: center;
  }
  
  .nav-link {
    display: block;
    padding: var(--spacing-lg) 0;
    font-size: var(--font-size-lg);
    text-align: center;
  }
  
  .nav-link::after {
    display: none;
  }
  
  
  .logo {
    gap: var(--spacing-sm);
    flex-direction: column;        /* stack branding under logo */
    align-items: flex-start;       /* left align */
  }
  
  .logo img,
  .logo .custom-logo {
    max-height: 100px; 
  }
  
  .logo h2 {
    font-size: var(--font-size-base); 
  }
  
  .logo h3 {
    font-size: 10px;
  }
  
  .site-header.menu-above-hero .top-bar .top-bar-content,
  .header .top-bar .top-bar-content {
    gap: var(--spacing-sm);
  }

  .site-header.menu-above-hero .top-bar .contact-info-mini,
  .header .top-bar .contact-info-mini {
    gap: var(--spacing-md);
  }
  
  /* Ensure headings sit right under the header when navigated to */
  section[id] .section-title,
  section[id] h1,
  section[id] h2 {
    margin-top: 0;
  }
  
  /* On small screens show only icons for contact info */
  .site-header.menu-above-hero .top-bar .contact-info-mini > span,
  .header .top-bar .contact-info-mini > span {
    display: inline-flex;
    align-items: center;
    font-size: 0; /* hide any text nodes inside the span */
  }

  .site-header.menu-above-hero .top-bar .contact-info-mini a,
  .header .top-bar .contact-info-mini a {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs);
    font-size: 0; /* hide text while keeping icon visible */
    line-height: 0;
  }
    
  .site-header.menu-above-hero .top-bar .contact-info-mini i,
  .site-header.menu-above-hero .top-bar .contact-info-mini svg,
  .header .top-bar .contact-info-mini i,
  .header .top-bar .contact-info-mini svg {
    font-size: var(--font-size-base);
    width: 1em;
    height: 1em;
    margin: 0;
    line-height: 1;
    display: inline-block;     /* normalize glyph box */
    text-align: center;        /* center icon within 1em box */
  }
  
  .site-header.menu-above-hero .top-bar .contact-info-mini > span i,
  .site-header.menu-above-hero .top-bar .contact-info-mini > span svg,
  .header .top-bar .contact-info-mini > span i,
  .header .top-bar .contact-info-mini > span svg {
    font-size: var(--font-size-base); /* restore icon size when span font-size is 0 */
    display: inline-block;     /* normalize glyph box */
    text-align: center;        /* center icon within 1em box */
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 var(--spacing-md);
    min-height: 0; /* ensure no forced height on extra-small screens */
  }

  .header {
    background-color: none !important;
    background: none !important;
    backdrop-filter: none !important;

  }
  
  /* No spacing or border on the nav at the smallest breakpoint */
  .nav { padding: 0; border-bottom: 0; }
  
  
  .logo img,
  .logo .custom-logo {
    max-height: 100px;
  }
  
  .logo h2 {
    font-size: var(--font-size-sm);
  }
}


html {
  scroll-padding-top: var(--header-height, 100px);
}

/* Header animation on scroll */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.site-header.menu-above-hero {
  animation: none; /* remove header slide-in on load */
}

.header {
  animation: none; /* remove header slide-in on load */
}

/* Alternative compact layout - everything in one line */

/*
.logo.compact-layout {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo.compact-layout .site-branding {
  flex-direction: row;
  align-items: baseline;
  gap: var(--spacing-xs);
}

.logo.compact-layout h3 {
  font-size: 10px;
  opacity: 0.6;
}

.logo.compact-layout h3::before {
  content: "• ";
  color: var(--color-primary);
}
*/


