/*------------------------------------------------------------------------
# Sticky Header Styles
# ------------------------------------------------------------------------
# Created for Drupal 11 - Bizreview Theme
# Description: Fixed/Sticky header with smaller logo on scroll
--------------------------------------------------------------------------*/

/* Regular Header State */
#header {
  transition: all 0.3s ease-in-out;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
}

/* Logo Container Transitions */
#logo {
  transition: all 0.3s ease-in-out;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
}

#logo img {
  transition: all 0.3s ease-in-out;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  max-height: 60px; /* Default logo height */
  width: auto;
}

/* Sticky Header Class - Applied on Scroll */
#header.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
  -webkit-animation: slideDown 0.3s ease-out;
}

/* Smaller Logo when Sticky */
#header.sticky-header #logo img {
  max-height: 30px; /* 50% smaller than regular header (60px / 2 = 30px) */
}

/* Alternative: If you want to use a different logo image for sticky header */
#logo .logo-sticky {
  display: none;
}

#header.sticky-header #logo .logo-regular {
  display: none;
}

#header.sticky-header #logo .logo-sticky {
  display: block;
  max-height: 30px;
}

/* Adjust Navigation Spacing in Sticky Mode */
#header.sticky-header nav.navbar {
  padding: 5px 0;
}

#header.sticky-header #main-navigation .menu > li > a,
#header.sticky-header #main-navigation .menu > li > span {
  padding: 15px 15px 20px;
}

@media (min-width: 1199px) {
  #header.sticky-header #main-navigation .menu > li > a,
  #header.sticky-header #main-navigation .menu > li > span {
    padding: 15px 25px 20px;
  }
}

/* Slide Down Animation */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@-webkit-keyframes slideDown {
  from {
    -webkit-transform: translateY(-100%);
    opacity: 0;
  }
  to {
    -webkit-transform: translateY(0);
    opacity: 1;
  }
}

/* Add padding to body to prevent content jump when header becomes fixed */
body.header-is-sticky {
  padding-top: 50px; /* Adjust based on your sticky header height */
}

/* Adjust for smaller screens */
@media (max-width: 991px) {
  #header.sticky-header {
    padding: 10px 0;
  }
  
  #logo img {
    max-height: 45px;
  }
  
  #header.sticky-header #logo img {
    max-height: 30px;
  }
  
  body.header-is-sticky {
    padding-top: 60px;
  }
}

/* Ensure smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Hide header-top when sticky (optional - uncomment if needed) */
/*
#header.sticky-header ~ #header-top {
  display: none;
}
*/
