/* Header Compact on Scroll */
#header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 500;
  background-color: #fff;
  transition: all 0.3s ease-in-out;
}

#header.header-compact {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Reducir padding del área principal del header */
#header.header-compact .header-main,
#header.header-compact .header-inner {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

/* Reducir tamaño del logo */
#header.header-compact .logo img {
  max-height: 40px !important;
  transition: max-height 0.3s ease-in-out;
}

/* Reducir font-size del menú */
#header.header-compact .gva-navigation>ul>li>a {
  font-size: 13px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* Ocultar topbar al hacer scroll */
#header .topbar {
  max-height: 50px;
  /* Altura normal del topbar */
  opacity: 1;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out;
}

#header.header-compact .topbar {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#header.header-compact .site-branding-logo {
  max-width: 100px !important;
  transition: max-width 0.3s ease-in-out;
}

/* Ocultar breadcrumb al hacer scroll */
#header .breadcrumb-links {
  max-height: 50px;
  opacity: 1;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out;
}

#header.header-compact .breadcrumb-links {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 991px) {
  body {
    padding-top: 120px;
  }
	
	.gva-search-region {
  display: none !important;
}

  /* En móvil, ajustes más sutiles */
  #header.header-compact .header-main,
  #header.header-compact .header-inner {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

#header.header-compact .gva-search-region {
  max-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;     /* NUEVO */
  pointer-events: none !important;   /* NUEVO */
}